1. Install XCode and homebrew
2. sudo brew install {postgresql,rbenv,ruby-build}
3. Close terminal. Open terminal.
4. mkdir proj && cd proj && rbenv install 1.9.2-p290 && rbenv local 1.9.2-p290
5. gem install rails && rbenv rehash
6. rails new foo
That should get you up and running on any OSX with a sustainable environment (i.e. one that you can actually reproduce in the future and that can mimic your live servers).