mac_ruby_on_rails_installer.sh
You may want to check the versions of things being installed, and replace with whats more current, but, it will give you an idea of an easy way to get started. Enjoy!
Side note, in case your new to unix the way that you would run the script is:
sudo sh mac_ruby_on_rails_installer.sh
From your administrator level account. Good luck!