"gem install therubyracer -v '0.10.2'" on osx mavericks not installing "gem install therubyracer -v '0.10.2'" on osx mavericks not installing ruby-on-rails ruby-on-rails

"gem install therubyracer -v '0.10.2'" on osx mavericks not installing


If you decide to use a newer therubyracer gem version, you will no longer have this problem

Otherwise:

brew tap homebrew/dupes # Thanks Tombrew install apple-gcc42export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2brew uninstall v8gem uninstall libv8gem install therubyracer -v '0.10.2' # specify version


So I finally got it working after some struggling... thanks to Simon and Alvaro.

I have one thing to add though, using the flag --with-system-v8 did not work for me... So i removed my system v8 with

brew uninstall v8

And the run

gem install libv8

If you have already run gem install libv8 with the system v8 flag be sure to uninstall that gem version (do it by running gem uninstall libv8). The important thing is that you shouldn't use the one provided by brew, it does not seem to work in Mavericks (it gets installed well and bundler will report that your bundle is complete, but your app will fail when it tries to use v8).

To summarize the answer, doing the following worked for me:

brew install apple-gcc42sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 /usr/bin/gccsudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++sudo ln -s /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 /usr/bin/cppbrew uninstall v8gem install libv8gem install therubyracer


I had the same problem, this works for me:

therubyracer (0.10.2) & libv8 (3.3.10.4)

First of all:

  • brew install apple-gcc42
  • you must link all the binary files of the compilers (gcc, cpp, g++) to /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/<compiler>

After, you could try this:

  • brew install v8
  • gem install libv8 -v '3.3.10.4' -- --with-system-v8
  • gem install therubyracer -v 'therubyracer' or bundle install into the directory of the rails project.