Installing Rails on Debian or Ubuntu is quite simple.
# aptitude update
# aptitude upgrade
Then, run
# aptitude install rubygems build-essential
This will install gem, the ruby package manager, and pull in ruby if you don’t have it installed already. The build-essential package isn’t required for rails itself, but assuming you’ll ever want to install a gem with native extensions (like mongrel), you’ll need it.
Don’t forget to export the path via /etc/bash.bashrc (eg:
export PATH=$PATH:/var/lib/gems/1.8/bin)
Lastly, we’ll install rails itself:
# gem install rails --include-dependencies
You’re done.
Note:
Do not install rails using apt-get/aptitude! The debian repository includes a very old and broken version.