I don\'t manage to install therubyracer gem on Yosemite 10.10.
Here is the log:
11:53 $ gem install libv8 -v \'3.16.14.3\' -- --with-system-v8 Building
I had the same issue on Yosemite. My solution is similar to what appears above.
Use gem uninstall libv8 to remove anything that might be installed.
gem uninstall libv8
Leave therubyracer in your Gemfile, but remove any explicit reference to libv8.
Run bundle install.
bundle install
libv8 then installed fine as a dependency.