安装libv8时出错:错误:无法构建gem本机扩展 [英] Error installing libv8: ERROR: Failed to build gem native extension

查看:132
本文介绍了安装libv8时出错:错误:无法构建gem本机扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个Rails项目,

I made a rails project with,

rails new test_bootstrap.

成功.

移动到项目目录并添加了宝石

moved to the project dir and added the gems

gem "therubyracer"
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem "twitter-bootstrap-rails"

并运行

bundle install

在那之后,我遇到了这个错误.

after that, i have this error.

Installing libv8 (3.16.14.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
지정된 경로를 찾을 수 없습니다.                                                          지정된 경로를 찾을 수
없습니다.                                                          지정된 경로를 찾을 수 없습니다.

c:/RailsInstaller/Ruby1.9.3/lib/ruby/ge
ms/1.9.1/gems/libv8-3.16.14.3/ext/libv8/builder.rb:58:in `setup_python!': libv8 requires
python 2 to be installed in order to build, but it is currently not available (RuntimeErr
or) from c:/RailsInstaller/Ruby1.9.
3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/libv8/builder.rb:42:in `block in build_lib
v8/builder.rb:42:in `block in build_libv8!'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/lib
v8/builder.rb:40:in `chdir'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/lib
v8/builder.rb:40:in `build_libv8!'
        from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/lib
v8/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/l
ibv8-3.16.14.3 for inspection.
Results logged to c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ex
t/libv8/gem_make.out
An error occurred while installing libv8 (3.16.14.3), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.16.14.3'` succeeds before bundling.

对不起一些韩国人.它说,它找不到所选的路径或类似的东西.

sorry for some Koreans. It says, It can't find the chosen path or something like that.

我试图运行此命令

gem install libv8 -v '3.16.14.3' 

抛出相同的错误.

推荐答案

尝试以下方法:

gem install libv8 -v '3.16.14.3' -- --with-system-v8

注意::由于libv8是therubyracer使用的V8引擎的接口, 即使您已经安装了V8,也可能需要使用libv8.如果 您希望使用自己的V8安装,而不是构建它 为您使用--with-system-v8选项.

Note : Because libv8 is the interface for the V8 engine used by therubyracer, you may need to use libv8, even if you have V8 installed already. If you wish to use your own V8 installation, rather than have it built for you, use the --with-system-v8 option.

有关更多信息,请查阅github上的 libv8的文档

For more you can go through the documentation of libv8 on github

这篇关于安装libv8时出错:错误:无法构建gem本机扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆