On Mac OS X Ruby 1.8.X is already pre-installed. But if you want to have the newest version 1.9.X you have to install it again. I assume that you installed already XCode and MacPorts on your machine. Than you have update your MacPorts
sudo port selfupdate
All right. Now you can install the newest version.
sudo port install ruby19
That’s it. Now you have to versions of Ruby on your computer. Check the version.
You should see something like this here:
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11]