Mavericks に次の gem バージョンをインストールしようとしています
- libv8 (3.16.14.3)
- therubyracer (0.12.1)
明らかに、therubyracer gem は libv8 に依存しています。
1) libv8 のインストール
libv8とは何ですか? 私のちょっとした調査は、それが Google Chrome で使用されるある種の JavaScript ライブラリであることを示しているようです。
インストールに問題がありましたが、この素晴らしい投稿には、エラーと、それを回避する方法に関する十分に説明された回答の両方が含まれていました.
だから私libv8
は
gem install libv8 -- --with-system-v8
これによりgemがインストールされますが、代わりにv8ライブラリのローカルシステムインストールが使用されることを理解しています...gemに付属のバージョンですか?いずれにせよ、それは成功しました。
2) ルビレーサーのインストール
次のステップで、therubyracer
gem のインストールに問題がありました。この宝石が何をするのかよくわかりませんが、私がしようとしている Rails プロジェクトの依存関係であることだけですbundle install
。
次のエラーが表示されます。
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/jeeves.butler/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** 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
--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=/Users/jeeves.butler/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
--with-pthreadlib
--without-pthreadlib
--with-objclib
--without-objclib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
/Users/jeeves.butler/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.16.14.3/ext/libv8/location.rb:50:in
'configure': You have chosen to use the version of V8 found
on your system (Libv8::Location::System::NotFoundError)
and *not* the one that is bundled with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location
thanks,
The Mgmt
from /Users/jeeves.butler/.rvm/gems/ruby-1.9.2-p290/gems/libv8-3.16.14.3/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/jeeves.butler/.rvm/gems/ruby-1.9.2-p290/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/jeeves.butler/.rvm/gems/ruby-1.9.2-p290/extensions/x86_64-darwin-13/1.9.1/therubyracer-0.12.1/gem_make.out
収集できる情報から、libv8
で提供されているものではなく、ローカルの V8 ライブラリを使用してインストールすることを選択しましlibv8
たが、ローカル インストールが見つからなくなりました。
- V8 が実際にインストールされているかどうかを確認するにはどうすればよいですか? また、その場所を特定するにはどうすればよいですか?
- 指定されたフラグをいくつか試してみましたが、どれも gem が正しいインストール ディレクトリを指しているようには見えませんでした
- これは別のトピックかもしれませんが、何
extconf.rb
ですか? 数カ所で見かけました。gcc
そして、具体的にコンパイラで何をしようとしていますか?
ありがとう!!
編集: