gem在ruby上安装libv8 --version'3.11.8.17'(Windows) [英] gem install libv8 --version '3.11.8.17' on ruby (windows)
本文介绍了gem在ruby上安装libv8 --version'3.11.8.17'(Windows)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问题如下.
Error installing libv8:
ERROR: Failed to build gem native extension.
D:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
The system can not find the specified path
D:Ruby193/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 be installed in order to build,but it is currently not available (RuntimeError)
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:35:in 'block in build_libv8!'
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'chdir'
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'build_libv8!'
from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'install!'
from extconf.rb:7: in '<main>'
I have installed the python27 and add the path.
python --version
Python 2.7.4
然后我检查以下代码.
def setup_python!
# If python v2 cannot be found in PATH,
# create a symbolic link to python2 the current directory and put it
# at the head of PATH. That way all commands that inherit this environment
# will use ./python -> python2
if python_version !~ /^2/
unless system 'which python2 2>&1 > /dev/null'
fail "libv8 requires python 2 to be installed in order to build, but it is currently #{python_version}"
end
`ln -fs #{`which python2`.chomp} python`
ENV['PATH'] = "#{File.expand_path '.'}:#{ENV['PATH']}"
end
end
我试图在Windows上安装Linux命令行,以便'ln -fs'可以正常工作.但是问题仍然无法解决.
I tried to install the Linux command line to windows so that the 'ln -fs' should be working.But the problem still can not be solved.
推荐答案
尝试一下:
gem install libv8 -v '3.11.8.17' -- --with-system-v8
直到我运行上述命令:)
This error was a pain untill I run the above command :)
这篇关于gem在ruby上安装libv8 --version'3.11.8.17'(Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文