Step one, pkg_add -r portupgrade.
Step two, portupgrade -ai.
Step three, portupgrade -R ruby1.8
That will install the latest Ruby 1.8.4, as easy as one two three, right. :D
gem update --system
With that you should have the latest Ruby on rails in ya FreeBSD.
gem install rails --include-dependencies