gem在ruby(windows)上安装libv8–3.11.8.17版

问题如下

安装libv8时出错:
错误:无法生成gem本机扩展。
D:/Ruby193/bin/ruby.exe extconf.rb
创建Makefile
系统找不到指定的路径
D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:49:in’setup_python!’:libv8需要安装python2才能构建,但它目前不可用(RuntimeError)
来自D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:35:in’block in build_libv8!’
来自D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in’chdir’
来自D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in’build_libv8!’
来自D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in’install!’
来自extconf.rb:7:in’<主>’
我已经安装了python27并添加了路径。
python——版本
Python 2.7.4

然后我检查代码如下

def setup\u python!
#如果在路径中找不到python v2,
#在当前目录中创建一个到python2的符号链接,并将其放入
#在路的尽头。这样,所有继承此环境的命令
#将使用./python->蟒蛇2
如果是python_版本!~/^2/
除非系统“哪个python2 2&gt&1&gt/dev/null'
fail“libv8需要安装python 2才能生成,但它当前为#{python_version}”
终止
`ln-fs{`which python2`.chomp}python`
ENV['PATH']=“#{File.expand_PATH'.}:#{ENV['PATH']}”
终止
终止

我试图将Linux命令行安装到windows,以便“ln-fs”能够正常工作。但问题仍然无法解决

试试这个:

gem安装libv8-v'3.11.8.17'--with-system-v8

在我运行上述命令之前,此错误是一个难题:)

发表评论