尝试安装libv8,“未能建立宝石原生扩展”(Attempting to install libv8

2019-07-30 07:17发布

我使用W7 64位。 简单地说,当我输入:

C:\Sites>gem install libv8

我得到这样的结果:

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

    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
which: no gmake in ("my PATH is here, and as far as I know it should include everything I need")
/usr/bin/env: python: No such file or directory
C:\RailsInstaller\DevKit\bin\make.EXE: *** [out/Makefile.ia32] Error 127
Using compiler: C:\RailsInstaller\DevKit\mingw\bin\g++.EXE
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=ia32 \
                  -S.ia32 -Dhost_arch=ia32


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/libv8-3.11.8.3 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.1
1.8.3/ext/libv8/gem_make.out

卸载并重新安装无法正常工作。

我试图安装libv8因为它是Twitter的引导护栏的依赖。

编辑:正如我说的,我在Windows上,现在我意识到,有一个在此错误中列出的文件路径是在/ usr / bin中/ env的。 所以这很奇怪。

Answer 1:

解决的办法是安装版0.0

gem install libv8 --version 3.11.8.0

直到这是固定的,因为我经历了这一点,太



Answer 2:

我有这个问题,以上@xiy使我的答案。 不得不改变

gem 'therubyracer'

gem 'therubyracer', :platforms => :ruby

与Windows并不需要或者类似的宝石。



Answer 3:

我有你所描述的相同的Windows的问题:

gem 'twitter-bootstrap-rails'

当我打开这个从GitHub的版本:

gem 'twitter-bootstrap-rails', :github => 'seyhunak/twitter-bootstrap-rails'

没问题。 把那一个镜头。



文章来源: Attempting to install libv8, “failed to build gem native extension”