2017-02-07 14 views
2

У меня возникли проблемы с установкой therubyracer на Windows Server 2012 R2.Ошибка при установке therubyracer

первый, я попытался с gem install therubyracer -v '0.12.3'

, который дал этот выход:

Temporarily enhancing PATH to include DevKit... 
Building native extensions. This could take a while... 
ERROR: Error installing therubyracer: 
     ERROR: Failed to build gem native extension. 

    C:/Ruby200/bin/ruby.exe extconf.rb 
checking for main() in -lpthread... no 
checking for v8.h... no 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of necessary 
libraries and/or headers. Check the mkmf.log file for more details. You may 
need configuration options. 

Provided configuration options: 
     --with-opt-dir 
     --without-opt-dir 
     --with-opt-include 
     --without-opt-include=${opt-dir}/include 
     --with-opt-lib 
     --without-opt-lib=${opt-dir}/lib 
     --with-make-prog 
     --without-make-prog 
     --srcdir=. 
     --curdir 
     --ruby=C:/Ruby200/bin/ruby 
     --with-pthreadlib 
     --without-pthreadlib 
     --enable-debug 
     --disable-debug 
     --with-v8-dir 
     --without-v8-dir 
     --with-v8-include 
     --without-v8-include=${v8-dir}/include 
     --with-v8-lib 
     --without-v8-lib=${v8-dir}/ 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError) 
of V8 found on your system and *not* the one that is bundled with 
the libv8 rubygem. 

However, your system version of v8 could not be located. 

Please make sure your system version of v8 that is compatible 
with 3.16.14.17 installed. You may need to use the 
--with-v8-dir option if it is installed in a non-standard location 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/lib/libv8.rb:7:in `configure_makefile' 
     from extconf.rb:32:in `<main>' 


Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3 for inspection. 
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3/ext/v8/gem_make.out 

Также пытался gem install therubyracer -v '0.12.3' -- --with-v8-dir

, который привел к этому выводу:

Temporarily enhancing PATH to include DevKit... 
Building native extensions with: '--with-v8-dir' 
This could take a while... 
ERROR: Error installing therubyracer: 
     ERROR: Failed to build gem native extension. 

    C:/Ruby200/bin/ruby.exe extconf.rb --with-v8-dir 
checking for main() in -lpthread... no 
*** extconf.rb failed *** 
Could not create Makefile due to some reason, probably lack of necessary 
libraries and/or headers. Check the mkmf.log file for more details. You may 
need configuration options. 

Provided configuration options: 
     --with-opt-dir 
     --without-opt-dir 
     --with-opt-include 
     --without-opt-include=${opt-dir}/include 
     --with-opt-lib 
     --without-opt-lib=${opt-dir}/lib 
     --with-make-prog 
     --without-make-prog 
     --srcdir=. 
     --curdir 
     --ruby=C:/Ruby200/bin/ruby 
     --with-pthreadlib 
     --without-pthreadlib 
     --enable-debug 
     --disable-debug 
     --with-v8-dir 
C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:1665:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError) 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/ext/libv8/location.rb:49:in `configure' 
     from C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/lib/libv8.rb:7:in `configure_makefile' 
     from extconf.rb:32:in `<main>' 


Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3 for inspection. 
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3/ext/v8/gem_make.out 

Если вам нужна дальнейшая информация пожалуйста препятствует мне знать.

+2

Возможный дубликат [therubyracer драгоценный камень на окнах] (http://stackoverflow.com/questions/6356450/therubyracer-gem-on-windows) –

ответ

2

Предоставленная ошибка означает, что у вас еще нет g ++.

Я думаю, вам нужно сначала запустить эту команду:

sudo apt-get install g++ 

 Смежные вопросы

  • Нет связанных вопросов^_^