When you install Mountain Lion, you will no longer have build tools such as
Step 1, get the latest Xcode, and install Command Line Tools, granting you
Step 2, create the symlink so that your bundler/gem commands will locate
gcc correctly :
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
Step 3, done! You don’t need MacPorts or a special version of
gcc, the one installed by Xcode4.5 Developer Preview 2 is just fine and compiles native extensions for me successfully.