2012-02-15 108 views
2

我试图做一个捆绑安装我的Windows计算机上,我曾尝试包括以下两个宝石:捆绑安装libv8(therubyracer)安装失败(与原生扩展)在Windows

gem 'therubyracer' 
gem 'libv8', '3.3.10.4' 

但无论是似乎工作,这给我留下了这个错误:

Installing libv8 (3.3.10.4) with native extensions Unfortunately, a fatal error has occurred. Please report this error to the Bun 
dler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Thanks! 
c:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: F 
ailed to build gem native extension. (Gem::Installer::ExtensionBuildError) 

     c:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb 
*** 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:/RailsInstaller/Ruby1.9.2/bin/ruby 
Checking for Python...Unable to build libv8: Python not found! 


Gem files will remain installed in c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4 for inspection. 
Results logged to c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/ext/libv8/gem_make.out 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:511:in `block in build_extensions' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `each' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:486:in `build_extensions' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:159:in `install' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/source.rb:90:in `block in install' 

     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:82:in `pre 
serve_paths' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/source.rb:89:in `install' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:73:in `block in insta 
ll_gem_from_spec' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/rubygems_integration.rb:97:in `wit 
h_build_args' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:72:in `install_gem_fr 
om_spec' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:56:in `block in run' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:55:in `run' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/installer.rb:12:in `install' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/cli.rb:220:in `install' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/task.rb:22:in `run' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/invocation.rb:118:in ` 
invoke_task' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor.rb:263:in `dispatch' 
     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/lib/bundler/vendor/thor/base.rb:386:in `start' 

     from c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.7/bin/bundle:13:in `<top (required)>' 
     from c:/RailsInstaller/Ruby1.9.2/bin/bundle:19:in `load' 
     from c:/RailsInstaller/Ruby1.9.2/bin/bundle:19:in `<main>' 

有没有解决的办法谢谢

+0

这是一个http://stackoverflow.com/questions/9174328/fatal-error-while-bundle-install-while-installing-libv8 – Simpleton 2012-02-15 13:44:49

回答

5

退房的语言依赖性:https://github.com/fractaloop/libv8/graphs/languages

您需要在您的机器上安装Python。我还会安装最新版本的捆绑器:

gem install bundler --pre 
+0

的副本感谢您的回应,尝试遵循github命令,并且git克隆地址挂了。我安装了nodejs并且这样做了。如果不是,应该好吗? – David 2012-02-15 14:19:28

+0

你在说Python或libv8吗?如果它正在工作,那么它应该没问题。你在工作网络上吗?您的防火墙可能会阻止git地址。 – Simpleton 2012-02-15 14:38:20

+0

@Simpleton是否成功在Windows上安装therubyracer? – 2012-04-15 09:09:06

1

确保您已安装Python 2.7并在Windows路径中。