The next thing to do is install all the required packages to get Rugy working.
apt-get -y install ruby ruby-dev rubygems sqlite3 libsqlite3-dev git
apt-get -y -t unstable install nodejs
Now we can install Rails using Ruby Gems.
gem install rails
As an option, you could install Rails using apt.
apt-get install ruby-rails-3.2
That's it. If you want to use other Ruby frameworks you can install them also. In this case I am going to give RefineryCMS a shot.