Most of the developers still use package managers to install ruby. This approach works, but most of the times it leads to dependency issues every now and then. Usually I don't use package managers to install ruby, instead I use ruby version manager (RVM) by wayneeseguin
In this post I'm going to install ruby 1.9.2 on Ubuntu with the help of rvm.
Usually I use "aptitude" to install packages as It's a better way to track the dependencies. If you don't have it installed on your system, you can get it by executing these command on a shell prompt.
Great everything is ready for you now. Have fun with rails 3.
tar --use-compress-program bzip2 -xvf your-file-name.tar.bz2