Upgrading Ruby and Rails on FreeBSD

This afternoon, I needed to update my FreeBSD workstation to get to the latest Ruby and Rails versions. This was because my current projects are using later versions of Ruby and Rails than what I had — Ruby 1.8.5 and Rails 1.2.3. As it turned out, since I have been using the FreeBSD ports, it was fairly easy to upgrade Ruby to the latest ports version, 1.8.6.

Ruby Happy

First, I had to refresh my ports tree:

portsnap fetch && portsnap extract

This step took a good while since I had not refreshed my ports tree for some time. Once it was completed, I needed to install portupgrade and upgrade the applications.

cd /usr/ports/ports-mgmt/portupgrade && make install clean
portupgrade -R ruby
portupgrade -R ruby18-gems

That step took care of Ruby and RubyGems, getting them to versions 1.8.6 and 0.9.4 respectively. For the Ruby upgrade, don’t enable pthread support, which could otherwise cause incompatibilities with other applications. Upgrading Rails was even easier using RubyGems.

gem update rails --include-dependencies

And that was it, now I am on Rails 1.2.5! I love it when things just work…

Comment

Commenting is closed for this article.