As you can see below, libv8 installs fine, but therubyracer doesn\'t. I\'m using Mac 10.7.4.
~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1> gem install lib
You can use the Libv8 from the brew instead of the one from gem. You can do that by following commands:
$ gem uninstall libv8
$ brew install v8
$ gem install therubyracer
I've had the exact same issue just till now.
This link saved me.
to sum up, you need to do this:
$ gem uninstall libv8
$ gem install therubyracer
before i fixed this issue, i had v8 installed in my mac. i don't know if this helped, since it seems have sth to do with js interpreter, I thought it might help.
According to https://github.com/cowboyd/therubyracer/issues/420#issuecomment-253592865
gem uninstall therubyracer
gem uninstall libv8
brew uninstall v8
brew install v8
gem install libv8
gem install therubyracer
It helped me. Parameters: ruby 2.3.3
, rails 4.2.9
Mac 10.10.5, Ruby 2.1.0 this worked for me:
gem uninstall libv8
gem uninstall therubyracer
brew upgrade gcc
brew install v8
bundle config --local build.libv8 --with-cxx=/usr/local/bin/gcc-6
gem install libv8 -v '3.16.14.17' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install # worked !
On Mavericks, you just need to update to therubyracer 0.12.0
On Mountain Lion 10.8, it doesn't come preinstalled with a C compiler. You'll need to download and install the 'command line tools' package from Apple themselves, and then run which gcc
to confirm it is installed. Everything should run fine from there on in.