After installing Ruby and Ruby Gems:
$ sudo apt-get install ruby rubygems
...
$ ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
$ gem -v
1.3.7
>
You will need a bunch of building tools. Googling "install rails 3.0.1 ubuntu" and you will find the info. It will be something like:
apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev
Also recommended is RVM, which is very good for having multiple Ruby versions and different gem sets, good for experimenting and for using different versions of Rails on the same machine.