Depending on the distribution you are using, there are several ways to install Ruby. The first option is simply to download the source code and compile by hand. However, on some platforms, there are package management solutions that make installing Ruby extremely easy.
For example, on Debian or Ubuntu apt-get provides an easy and elegant solution:
% sudo apt-get install ruby irb rdoc
For irb and rdoc you will need to enable the universe repository.
Installing from the source code is a great solution for when you are comfortable enough with your platform and perhaps need specific settings for your environment. It’s also a good solution in the event that there are no other premade packages for your platform.
For information about the Ruby Subversion repository, see our Ruby Core page.