What have you tried? There's
RVM to manage different versions of ruby. Though I don't like using scripts piped in from the net which they promote. I prefer to
compile ruby into my system and keep rvm out of my environment. You can use git to select the latest available version of ruby as well as use git to continuously upgrade ruby on your system.
Once you have ruby installed according to the
rails website you should simply run a gem command to install rails.