Prem Sichanugrist put together a very helpful Hitchhiker's Guide to Riding a Mountain Lion that outlines most of the process for upgrading to Mountain Lion and getting RVM, Homebrew and the like back on track.
In going through this process I had to take a few additional steps to get things dialed in:
Using only the CLI developer tools (and not XCode)
Since I don't use XCode and despise uninstalling, downloading an updating it every few months, I wanted to avoid it this go around.
It turns out that the CLI tools by themselves (without XCode) suffice for my Ruby environments and Rails projects. So I blew away XCode 4.2.1 and downloaded the latest developer tools from http://developer.apple.com/downloads/index.action.
I run late model and classic versions of Ruby under RVM, so I installed old GCC:
brew tap homebrew/dupes
brew install apple-gcc42
But, brew installs apple-gcc42 to /usr/local/bin/gcc-4.2, so I had to adjust my CC path in ~/.profile:
(I had previously been using /usr/bin/gcc-4.2)
I had to reinstall ImageMagick, as I always do after an OS upgrade, and that went well after updating brew.
Reinstalling the rmagick gem is my typical test case for making sure my ImageMagick installation is solid. Despite the CC path setting mentioned above, I found that I also needed to symlink the apple-gcc42 version of gcc-4.2 to the location where it is expected to be during gem installation (as opposed to rvm ruby installations which listen to the CC path):
sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2
Ruby installations via RVM
You should always make sure you can compile rubies after going through an OS upgrade.
Reinstalling 1.9.2 and 1.9.3 rubies via RVM went smoothly for me, but I had to pass an extra flag to appease ree-1.8.7:
CFLAGS="-I/opt/X11/include" rvm reinstall ree
But, what about MacPorts?
If you need help getting MacPorts back on track as well, see my colleague Phil Cohen's post on the subject:
Upgrading to Mountain Lion - Ruby + MacPorts.