therubyracerでインストールエラー

Railsでプロジェクト作ろうと思ったらなぜかbundle installでエラーが発生する。

/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for v8.h... no

therubyracerインストール中にlibv8が見つからずエラーになってるみたい。
とりあえずlibv8を入れなおす。

gem uninstall libv8
gem install libv8

単体でtherubyracerをインストールする

gem install therubyracer

linking shared-object v8/init.so
/usr/bin/ld:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a: file format not recognized; treating as linker script
/usr/bin/ld:/usr/local/rvm/gems/ruby-1.9.3-p194/gems/libv8-3.11.8.3-x86_64-linux/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a:1: syntax error

なぜかsyntax errorで怒られる。

この間までは動いていたので、どうやらtherubyracerのバージョンが上がったのが原因くさい。
rubygems.orgで確認。


all versions of therubyracer

101 versions since December 21, 2009

0.11.0 December 4, 2012
0.11.0beta8 August 13, 2012 x86_64-linux

日付的に0.11.0のGAと相性が悪いっぽいので、beta8を指定してbundle install

gem 'therubyracer', '0.11.0beta8'

Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

うまくいった!