无法安装libv8 3.11.8.17 gem。我已经看了看,发现它不支持Windows。尽管我还在寻找变通办法?
Installing libv8 (3.11.8.17)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.11.8.17/ext/libv8/builder.rb:49:in `setup_python!': libv8 requires python 2 to b
e installed in order to build, but it is currently not available (RuntimeError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.11.8.17/ext/libv8/builder.rb:35:in `block in build_libv8!'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.11.8.17/ext/libv8/builder.rb:34:in `chdir'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.11.8.17/ext/libv8/builder.rb:34:in `build_libv8!'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.11.8.17/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
Gem files will remain installed in
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-
3.11.8.17/ext/libv8/gem_make.out
An error occurred while installing libv8 (3.11.8.17), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.我不会尝试使用libv8,老实说,我也不知道什么是宝石依赖于therubyracer。安装Python27和设置路径没有任何作用。除了更换平台之外,我还能做些什么?或者,也许https://github.com/hiranpeiris/therubyracer_for_windows提供的v8.dll有一个我不太理解的变通方法?
发布于 2013-11-23 09:05:30
尝尝这个
gem install libv8 -v '3.16.14.3' -- --with-system-v8从这里回答
Error installing libv8: ERROR: Failed to build gem native extension
发布于 2013-08-28 01:17:11
我只在我的Linux环境中使用prod上的libV8和TheRubyRacer。我在Gemfile中将它们分开:
group :production do
gem 'libv8', '~> 3.11.8.3'
gem 'therubyracer', :platform => :ruby
end然后我捆绑安装而不生产:
bundle install --without production(参见SO文章:Why does 'bundle' install production gems on my development machine?)
这似乎避免了Windows上关于V8的整个争论。
https://stackoverflow.com/questions/17237467
复制相似问题