The problem is as following.
Error installing libv8:
ERROR: Failed to build gem native extension.
D:/Ruby193/bin/ruby.exe extconf.rb
creating Makefi
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.
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
.
Try with https://github.com/eakmotion/therubyracer_for_windows. I had solved same problem on my windows machine using this solution.
Try this:
gem install libv8 -v '3.11.8.17' -- --with-system-v8
This error was a pain untill I run the above command :)
Follow these steps:
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
do: gem install rmagick -v '2.13.2'
and then do: gem install libv8 -v 3.11.8.17 -- --with-system-v8