OK, I’m at the end of my tether with this. There are a few similar questions but they all refer to therubyracer 0.10, and they mostly conclude that the problem can be fixed by u
I had this same problem when I upgraded from OSX Mountain Lion to OSX Mavericks. The patch level of ruby 1.8.7 apparently matters.
Upgrading from ruby-1.8.7-p354 to ruby-1.8.7-375 did the trick for me.
libv8 (3.16.14.3-x86_64-darwin-13) and the therubyracer (0.12.0) gems installed without problem.
assuming you use rbenv:
rbenv versions
system
* 1.8.7-p354
2.0.0-rc2
rbenv uninstall 1.8.7-p354
rbenv install 1.8.7-p375
rbenv versions
system
* 1.8.7-p375
2.0.0-rc2
bundle install
This issue no longer exists in the latest version of therubyracer
(0.12.3).
bundle update therubyracer
I was able to get things going again by running gem install libv8 -v '3.16.14.3' -- --with-system-v8
.
Reference: https://github.com/cowboyd/libv8/issues/120
It could be that rubygems
is fetching the wrong binaries for your system.
Diagnosis:
gem env platform
to 'Kernel Version' under > About This Mac > System Report > Software
Kernel Version: 14.4.0
and x86_64-darwin-12
) then RubyGems is grabbing the wrong version of therubyracer
and libv8
for your systemFix:
bundle update therubyracer --platform=x86_64-darwin-14
OK, so this is now sorted.
For future people with the same problem, I was suffering from having ruby built against a previous installation of OS X.
Fixed by completely nuking rvm and starting from scratch, though I imagine you could just uninstall/reinstall the offending ruby.
More details on how the problem was solved here:
https://github.com/cowboyd/libv8/issues/120
I was able to proceed with ruby racer after rm Gemfile.lock
Perhaps try this, which is easier than the RVM nuke option.
beforehand:
I installed v8 via brew install v8
, and then did gem install libv8 -v '3.16.14.3' -- --with-system-v8
and I am running 10.10 Yosemite