NewsWorksSoftwareTextBioContact
background image

Getting the Lion to RoR

July 30, 2011

I’m in the process of upgrading to OSX 10.7 Lion. The install process went smooth, and I’m now testing and updating the many programs I have installed and use. Most of them seem to be fine.

OSX no longer comes with Ruby On Rails (RoR) preinstalled. That makes sense to me. The preinstalled versions of Rails always lagged behind, and the first one had to do was to update it all.

As expected, no Rails showed up initially after the upgrade. But having installed the latest version:

sudo gen install rails

all previous versions and gems remains available, as can be seen by running:

gem list

I also had to reinstall ImageMagick, used by various Rails applications for image rescaling, cropping, etc. Following the migration instructions at MacPorts I cleaned out all previously installed ports, and then reinstalled ImageMagick. That seemed to go smooth.

I have tested the various Rails applications that I am developing or testing locally, and the only problem I have observed is that Webrick, the default web server used for serving Development versions of the apps, struggles to deliver the content of the Public folder. I often got the following message, while images and CSS fail to show up:

rails ERROR NoMethodError: private method 'gsub!'

The workaround, according to this thread seems to be to install mongrel, and use mongrel as Development server rather than Webrick, with the command:

ruby script/server mongrel

The only thing left to test is Passenger for Deployment.