This worked for me on 2014-02-20 after MUCH searching! brew tap homebrew/dupes brew install apple-gcc42 export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 sudo mv /usr/bin/g++ /usr/bin/g++_apple sudo ln -sf /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++ gem uninstall libv8 gem install therubyracer -v=0.11.4 sudo mv /usr/bin/g++_apple /usr/bin/g++ See also http://stackoverflow.com/a/21453272/120818