Hivelogic has good overall instructions on installing your own version of ruby in /usr/local here: http://hivelogic.com/articles/ruby-rails-leopard
The steps are the same for installing 1.8.7 or 1.9, you just change the version of Ruby that you download.