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

后端 未结 8 1317
攒了一身酷
攒了一身酷 2020-11-28 22:39

The problem is as following.

Error installing libv8:
ERROR: Failed to build gem native extension.

    D:/Ruby193/bin/ruby.exe extconf.rb
    creating Makefi         


        
相关标签:
8条回答
  • 2020-11-28 22:53

    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.

    0 讨论(0)
  • 2020-11-28 22:56

    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.

    0 讨论(0)
  • 2020-11-28 22:57

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

    0 讨论(0)
  • 2020-11-28 22:58

    Try this:

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

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

    0 讨论(0)
  • 2020-11-28 22:59

    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 
    
    0 讨论(0)
  • 2020-11-28 23:13

    do: gem install rmagick -v '2.13.2'

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

    0 讨论(0)
提交回复
热议问题