So you took the leap of faith like i did upgrading to Mountain Lion... Well as you probably already know, you maybe finding out a couple issues...
In Mountain Lion some of the needed components are missing. So you need to reinstall them.
Getting Xcode + Command Line Tools Installed
You can get Xcode from the Mac App Store. You’ll need at least version 4.4 of Xcode for it to work with OS X Mountain Lion. After the installation, open up Xcode in your /Applications folder. You’d want to go to Xcode -> Preferences -> Downloads tab then install the “Command Line Tools.” After you’re done, quit Xcode and fire up Terminal.
Also with Xcode everything is neatly bundle in the app, so you may need to tell all the other compnents where it is, run this in terminal
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
You can download the package installer from here
or do an install via Homebrew
brew tap homebrew/dupes brew install apple-gcc42
MySQL is again a missing component in OS X 10.8 and needs to be dowloaded from the MySQL site use the Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive version (works fine on 10.8). Just click the No thanks, just take me to the downloads! and proceed to download.
Apple has already removed X11 support from their operating system, but you can still get the X11 package from XQuartz website.
getting rubyracer and libv8 to install
Once you have installed and updated homebrew, rails and ruby via RVM you can go ahead and install rubyracer and libv8 manually.
gem install libv8 -v '184.108.40.206' gem install therubyracer -v '0.11.0beta5'
Update Your Gem file
Update Gemfile to use beta version of 'therubyracer' gem "therubyracer", "~> 0.11.0beta5"
If you have any comments or suggestions please fee free to let me know on Twitter. @dakotalightning Hope you find this helpful.
Sources http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion https://gist.github.com/1860902 http://xquartz.macosforge.org/trac/wiki/X112.7.2 http://stackoverflow.com/questions/11677480/after-xcode-4-4-and-osx-10-8-installation-failed-to-build-gem-native-extensio http://coderwall.com/p/dtbuqg