If you're receiving the following error message then chances are you're trying to install therubyracer gem on OS X Mountain Lion:
$ make $ compiling rr.cpp $ make: g++-4.2: No such file or directory $ make: *** [rr.o] Error 1
Luckily there's an easy fix.
Make sure you've installed Xcode 4 Command Line Tools so that your g++ directory is in /usr/bin.
$ cd to /usr/bin $ sudo ln -s g++ g++-4.2
$ cd /usr/bin/ && sudo ln -s g++ g++-4.2