gem install libv8 --version '3.11.8.17' on ruby (windows)

主宰稳场 提交于 2019-11-27 03:01:15

Try this:

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

This error was a pain untill I run the above command :)

Vieenay Siingh

Try with https://github.com/eakmotion/therubyracer_for_windows. I had solved same problem on my windows machine using this solution.

Follow these steps:

  1. Get suitable Python from here http://python.org/download/
  2. Set path with this command SET PATH=<ruby directory>;<python directory> (e.g. SET PATH=C:\Ruby192\bin;C:\Python27)

And now install your desire gem

gem install libv8

Got this solution from here.

I wonder if you are getting this error for version. Try this:

gem install libv8 --version 3.11.8.0 

Be sure that you can actually run the "which" command on your system. It's not native to Windows.

"which" should be installed if you installed DevKit or RailsInstaller. However, I am running into this problem too (I also have a number of versions of python installed and working), and just discovered that my which command under DevKit... (and the one under RailsInstaller...) is not actually working.

The windows near equivalent is "where". So you should run "WHERE which" to find out if/where you have the "which" command on your system.

That doesn't make 'therubyracer' work, or issues with libv8 go away, but it is part of the puzzle.

(I've posted the problem to the msysGit folks to see what they say about the non-executing 'which' command.)

I could be reading this wrong, but I think the problem is this line:

unless system 'which python2 2>&1 > /dev/null'

It's looking for python2 when in fact the command for python is simply python.

Perhaps try aliasing python to python2.

abcd_win

do: gem install rmagick -v '2.13.2'

and then do: gem install libv8 -v 3.11.8.17 -- --with-system-v8

This error is about a libv8-3.11.8.17\ext\libv8\builder.rb script. On line 60 we can see this code:

`python -c 'import platform; print(platform.python_version())'`.chomp

This is a wrong python command syntax in Windows. You should use a double quotes, like this:

`python -c "import platform; print(platform.python_version())"`.chomp

After fixing this script, you should run gem install with "-l" (use local only) key. If you don't, gem will download a script with an error again.

These are the following steps I have to take to get therubyracer to work on windows:

1) Install Python 2.7

2) Go here here https://github.com/eakmotion/therubyracer_for_windows and follow instructions

3) comment therubyracer gem in the Gemfile & Run Bundle install

#gem 'therubyracer'

4) Uncomment gem therubyracer in the Gemfile & Run Bundle install

gem 'therubyracer'
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!