【问题标题】:Problems with jslint-v8 Ruby gem installation on Windows7 64-bit在 Windows 7 64 位上安装 eslint-v8 Ruby gem 的问题
【发布时间】:2012-05-30 08:33:17
【问题描述】:

在 Windows 7(64 位)上设置 Rally App SDK 2.0p 环境时出现问题。我已经从 ruby​​installer.org 安装了 Ruby 1.8.7-p358 并设法安装了 rake Ruby gem。但我在安装 jslint-v8 gem 时遇到问题。它依赖于需要使用 Ruby DevKit 构建的 therubyracerlibv8 gems。在安装过程中出现以下错误:

C:\ruby> gem install jslint-v8
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing jslint-v8:
    ERROR: Failed to build gem native extension.

    C:/ruby/bin/ruby.exe extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/ruby/bin/ruby
extconf.rb:13: uninitialized constant Gem (NameError)
Checking for Python...

Gem files will remain installed in C:/ruby/lib/ruby/gems/1.8/gems/libv8-3.3.10.4 for inspection.
Results logged to C:/ruby/lib/ruby/gems/1.8/gems/libv8-3.3.10.4/ext/libv8/gem_make.out

有人知道如何在Win7中正确安装吗? 谢谢!

【问题讨论】:

    标签: ruby windows-7 sdk jslint rally


    【解决方案1】:

    您尝试安装的 gem 取决于 libv8 gem,它只不过是 Google V8 JavaScript VM 的包装器。

    没有针对 Windows 的预编译 libv8(就像 Linux 或 OSX 一样),这意味着它需要从头开始构建 V8。

    围绕V8的构建过程的代码不是很便携,更不用说编译libv8你需要安装Python:-P

    直到今天,没有人能够按照存储库说明在 Windows 上按照 libv8 预编译说明进行操作:

    https://github.com/cowboyd/libv8

    很抱歉未能为您提供更好的答复。

    【讨论】:

      【解决方案2】:

      试试这个 gem install libv8 -v '3.16.14.3' -- --with-system-v8

      参考:Error installing libv8: ERROR: Failed to build gem native extension

      【讨论】:

      • 为我工作...等等...嗬它没有。它询问我在我的本地系统上哪里可以找到 libv8,它不是。
      【解决方案3】:

      要在安装 gem 时在 Windows 中构建 gem 原生扩展,通常还需要安装 DevKit: http://rubyinstaller.org/downloads/ - 前往 devkit 下载链接
      他们的 github 页面有安装说明:https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

      我还建议使用 Ruby 1.9.3 而不是 1.8.7,但这应该不是什么大问题

      希望对您有所帮助。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-10-01
        • 2016-11-28
        • 1970-01-01
        • 2015-08-02
        相关资源
        最近更新 更多