首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gem install libv8 -- ruby (windows)上的版本'3.11.8.17‘

gem install libv8 -- ruby (windows)上的版本'3.11.8.17‘
EN

Stack Overflow用户
提问于 2013-05-13 12:13:27
回答 8查看 26.9K关注 0票数 45

问题如下。

代码语言:javascript
复制
Error installing libv8:
ERROR: Failed to build gem native extension.

    D:/Ruby193/bin/ruby.exe extconf.rb
    creating Makefile
    The system can not find the specified path

        D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/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.11.8.17/ext/libv8/builder.rb:35:in 'block in build_libv8!'
             from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'chdir'
             from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'build_libv8!'
             from D:Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.17/ext/libv8/builder.rb:34:in 'install!'
             from extconf.rb:7: in '<main>'
I have installed the python27 and add the path.

python --version
Python 2.7.4

然后我检查代码,如下所示。

代码语言:javascript
复制
 def setup_python!
      # If python v2 cannot be found in PATH,
      # create a symbolic link to python2 the current directory and put it
      # at the head of PATH. That way all commands that inherit this environment
      # will use ./python -> python2
      if python_version !~ /^2/
        unless system 'which python2 2>&1 > /dev/null'
          fail "libv8 requires python 2 to be installed in order to build, but it is currently #{python_version}"
        end
        `ln -fs #{`which python2`.chomp} python`
        ENV['PATH'] = "#{File.expand_path '.'}:#{ENV['PATH']}"
      end
    end

我尝试将Linux命令行安装到windows中,以便'ln -fs‘应该是working.But,这个问题仍然不能解决。

EN

回答 8

Stack Overflow用户

发布于 2013-09-06 08:30:21

试试这个:

代码语言:javascript
复制
gem install libv8 -v '3.11.8.17' -- --with-system-v8

在我运行上面的命令之前,这个错误是一个痛苦的问题:)

票数 165
EN

Stack Overflow用户

发布于 2013-05-15 05:52:57

尝试使用https://github.com/eakmotion/therubyracer_for_windows。我已经用这个解决方案在我的windows机器上解决了同样的问题。

票数 12
EN

Stack Overflow用户

发布于 2013-06-26 04:49:51

请按照以下步骤操作:

使用以下命令

  1. 从此处获取合适的SET PATH=<ruby directory>;<python directory>路径(例如SET PATH=C:\Ruby192\bin;C:\Python27)

现在安装你想要的宝石

代码语言:javascript
复制
gem install libv8

here获得此解决方案。

我想知道你是不是收到这个版本的错误。试试这个:

代码语言:javascript
复制
gem install libv8 --version 3.11.8.0 
票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16514758

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档