These are the steps I had to follow to get Rails Edge (4.0.0.beta at the moment of writing) in my Ubuntu 12.10 box.
Ruby and Rails Setup in Ubuntu 12.10
Ok so you want to start development in Ubuntu with Ruby/Rails, follow the instructions below and you well be coding in ruby in a few minutes!