2

Windows 7 (64 ビット) での Rally App SDK 2.0p 環境のセットアップ中に問題が発生します。rubyinstaller.org から Ruby 1.8.7-p358 をインストールし、rake Ruby gem をインストールできました。しかし、jslint-v8 gem のインストールに問題があります。Ruby DevKit を使用してビルドする必要があるtherubyracerおよびlibv8 gemに依存しています。インストール中に、次のエラーが発生しました。

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に正しくインストールする方法を知っている人はいますか? ありがとうございました!

4

3 に答える 3

7

インストールしようとするlibv8gem は、Google V8 JavaScript VM のラッパーに過ぎない gem に依存します。

(Linux や OSX 用のように) Windows 用にコンパイル済みの libv8 はありません。つまり、V8 を最初からビルドする必要があります。

V8 のビルド プロセスに関するコードはあまり移植性が高くありません。言うまでもなく、libv8 をコンパイルするには Python をインストールする必要があります :-P

今日まで、リポジトリの指示に従って、Windows で libv8 プリコンパイルの指示に従うことができた人は誰もいませんでした。

https://github.com/cowboyd/libv8

申し訳ありませんが、より良い応答を提供できませんでした。

于 2012-06-07T00:16:46.630 に答える
1

このgem install libv8 -v '3.16.14.3' -- --with-system-v8 を試してください

参照: libv8 のインストール中にエラーが発生しました: エラー: gem ネイティブ拡張機能のビルドに失敗しました

于 2014-03-22T09:58:27.877 に答える
-1

gem をインストールするときに Windows で gem ネイティブ拡張機能をビルドするには、通常、DevKit もインストールする必要があります: http://rubyinstaller.org/downloads/ - devkit ダウンロード リンクに移動し ます。 /github.com/oneclick/rubyinstaller/wiki/Development-Kit

1.8.7 の代わりに Ruby 1.9.3 を使用することもお勧めしますが、それは大きな問題にはなりません。

それが役立つことを願っています。

于 2012-05-31T13:30:24.920 に答える