仕事に就くのに少しでもお役に立てれば幸いgem install therubyracer
です。エラーは次のとおりです。
$ gem install therubyracer
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
/Users/david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lobjc... yes
*** 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/david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-objclib
--without-objclib
extconf.rb:15:in `<main>': undefined method `include_path' for Libv8:Module (NoMethodError)
エラーが発生する前に実行したいくつかの注目すべき手順を次に示します。彼らはうまくいきました:
$ gem install libv8
$ brew install v8
私の環境は次のとおりです。
- Mac OS X ライオン 10.7.4
- ruby 1.9.3p194 (2012-04-20 リビジョン 35410) [x86_64-darwin11.4.0] (rvm 経由)
- V8 バージョン 3.9.24 (自作経由)