ruby-on-rails - 安装包时出现 fatal error (安装 libv8 时)

标签 ruby-on-rails ruby-on-rails-3 rubygems

我在 windows7(32 位)上工作,但在安装 bundle 时出现错误;

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

       C:/Ruby192/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:/Ruby192/bin/ruby
Checking for Python... Unable to build libv8: Python not found! 

所以我无法完成“捆绑安装”。

最佳答案

安装 ActivePython 版本 2.7.2.5,然后运行:

gem install libv8 --version 3.11.8.0

在windows下安装libv8,最新版本3.11.8.3在windows下不能用,3.11.8.0在windows 7下可以。

关于ruby-on-rails - 安装包时出现 fatal error (安装 libv8 时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9174328/

相关文章:

ruby-on-rails - Controller 定义中的脚手架不再有效吗?

ruby-on-rails - 使用 ruby​​ on rails 为 haml 创建一个助手或其他东西

ruby-on-rails - 使用first_or_create检索对象时在对象上创建注释的问题

javascript - 如果用户暂停输入1-2秒如何进行自动搜索?

ruby-on-rails - 刹车手不喜欢救援

ruby - 根据 Sinatra 环境需要 gem

ruby - 选择 ""与 ruby 中的 Mechanize 链接

Mysql2::错误:使用 Rails 的 key '2016' 重复条目 'PRIMARY'

ruby-on-rails - 在 Soulmate::Loader 中添加两个参数

ruby-on-rails - 通过 Rails 3 中的唯一列值选择所有列