nothing but the script I used:

#install Ruby and relative
apt-get install ruby


#install wget
sudo apt-get install wget

#install rubygems
wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
tar xzf rubygems-1.3.1.tgz
cd rubygems-1.3.1
sudo ruby setup.rb
gem -v
1.3.1

# or update rubygems
sudo gem install rubygems-update -v 1.3.1

#install Rails and dependencies
gem install rails –include-dependencies -v=2.2.2


#install Sqlite3

apt-get install sqlite3 swig libsqlite3-ruby libsqlite3-dev

apt-get install ruby1.8-dev libsqlite3-dev (required)


gem install sqlite3-ruby #compile this need libsqlite.h