I just upgraded from OS X Lion to OS X Mountain Lion. My rails environment for the most part stayed in tact.
The only steps I had to do to get things back to a good
I was able to get it to work by installing the Postgres.app from Heroku and removing my existing postgresql installation. You can download the app here:
http://postgresapp.com/
brew remove postgresql
bundle install
If you didn't use brew, here's a link to more uninstall docs from Postgres.app
http://postgresapp.com/documentation#toc_16