Recipe for RoR on Ubuntu:
sudo apt-get install ruby
sudo apt-get install rubygems
sudo apt-get install irb
sudo apt-get install ri rdoc ruby1.8-dev build-essential
sudo gem install rails --include-dependencies --remote
sudo apt-get install libmysql-ruby
sudo gem install activerecord-sqlserver-adapter --source=http://gems.rubyonrails.org