$ sudo apt-get install ruby-full
This will install Ruby 1.9.3 as of this writing.
I want to do Ruby on Rails, I need to install Rails.
Rails however require “make” which is not installed out of the box.
So we need to install that first.
$ sudo apt-get install make
Apparently, it also require zlib development libraries.
You need to install it by running the following command:
$ sudo apt-get install zlib1g-dev
Before installing Rails, you may want to install the “rdoc” package.
If not, you may encounter the error message “file ‘lib’ not found”.
$ sudo gem install rdoc
After installation of “rdoc” package, you can install Rails using:
$ sudo gem install -V rails
Note: The “-V” parameter in the above command makes the installation process more verbose and may be omitted. If omitted, it may appear as if the process is hanged as there is not visible feedback on the installation process. The download and installation process itself takes quite a while.
Alternatively, you may want to run the following command to install Rails instead. This command will not install documentation for Rails which can take some time to generate (and hence misled you to think that the process has hanged).
$ gem install rails --no-ri --no-rdoc