Setting up your system to develop Ruby on Rails applications could be daunting and a headache. Go Rails has a pretty thorough guide on how to do it on various versions of Mac OS X and Ubuntu.
The guides are pretty close to how I setup my Ruby on Rails dev environment on my Mac, with the exception of the PostgreSQL step. I use Postgress.app instead. If you’ve ever banged your head against the wall trying to get a Rails enviroment up on your machine, definitey check out Go Rails’ guides.