所以這是我嘗試在我的Windows安裝libv8:libv8需要蟒蛇2安裝在以建設 - 視窗
D:\projects\perfstats>gem install libv8
Fetching: libv8-3.16.14.1.gem (100%)
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.
D:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/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.16.14.1/ext/libv8/builder.rb:35:in `block in build_libv8!'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:34:in `chdir'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:34:in `build_libv8!'
from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
我安裝Python 2.7版,並將其添加到路徑:
D:\projects\perfstats>python -V
Python 2.7.3
任何想法可能是這種情況下的解決方案?
你重新啓動實例*修改'PATH'之後,在頂部示例*中使用了'cmd.exe'? – Aya
是的,我記得這一點。 – user2192677
我對Ruby一無所知,但看着[類似的問題](http://stackoverflow.com/questions/16514758/gem-install-libv8-version-3-11-8-17-on-ruby-windows) ,它看起來不適合在Windows上工作。 'which python2 2>&1>/dev/null'是非常特定於Unix的。 – Aya