ubuntu 10.04 server ruby 1.9.2 rvm

http://www.web2linux.com/05/installing-rails-3-on-ubuntu-10-04-lucid-lynx/
https://rvm.beginrescueend.com/rvm/install/

First, let\u2019s install all of the necessary tools and libraries:

apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev

Install ruby 1.9.2 using RVM. Refer to the official RVM instructions here. Make sure you have curl and git installed (from above) and run this command:

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

Then add this line as the last line in your .bashrc:

if -s "$HOME/.rvm/scripts/rvm" ; then source "$HOME/.rvm/scripts/rvm" ; fi

Close your terminal and open a new one, then run the following to test RVM install:

rvm notes

Next, you can begin ruby 1.9.2 installation by running:

rvm install 1.9.2

The install will take up to several minutes and once it completes you have to set ruby 1.9.2 as the default version:

rvm --default ruby-1.9.2

Then you can test your new ruby install:

ruby -v

And now, to install Rails 3 simply type in your terminal:

sudo gem install rails

The above line should be all you need, as it will take care of installing all of the pre-requisite gems that Rails 3 needs, like rack and bundler.