Navigation

ADS specializes in using Ruby on Rails to build advanced, scalable, database-backed web sites for organizations of all sizes. Find out more at our website.

Atlantic Dominion Solutions

I upgraded to Leopard the weekend it was released and had been using MacPorts to do my Ruby install. However, after the upgrade some things weren’t working right, most notably rmagick created fireworks when I’d try to load it, and in the last day or two MySQL has decided to stop working too. So, tonight I’m dumping MacPorts and moving everything to native installs. To help you do likewise, here are a few things to remember when you’re getting Rails to work on OSX Leopard:

  • Leopard was bundled up with some slightly older gems, so make sure to do do “gem outdated” to see what updates are available, then “gem update” to grab all of the updates.
  • Everyone developer needs a database. If your database of choice, for development purposes at least, happens to be MySQL, you’ll be slightly disappointed to know that at the time of writing there isn’t a fully Leopard compatible MySQL package available, yet. Thankfully Orlando’s own (and forthcoming Acts_as_Conference speaker) Dan Benjamin has come to the rescue with a complete install guide for MySQL on Leopard, which also includes a handy-dandy downloadable bash script to take all of the effort out. Thanks Dan!
  • The one library I was surprised that wasn’t included with Rails is the RMagick gem. RMagick is the Ruby plugin for using the venerable ImageMagick, or the GraphicsMagick spinoff, and is a bit tricky to install due to the sheer amount of prerequirements it has. Thankfully the OnRails.org folks have put together a great tutorial on installing RMagick on Leopard without using MacPorts, which will help keep your system nice ‘n clean.

Thanks to Dan Benjamin and the OnRails team for the tutorials, they’ll be a great help for Leopard users for ages to come. Of course if someone wanted to do a proper installer for RMagick I’m sure a tip jar could be organized :-) - any takers?

Note: If you’re installing on a PowerPC machine you need to modify the following line of Dan’s MySQL installer script:

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

to say:

sudo env ARCHFLAGS="-arch ppc" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Make sure you make that change before trying to run the script otherwise you’ll end up with some difficulties. Other than that little detail it works perfectly.

Share this post

Random Posts

You can skip to the end and leave a response. Pinging is currently not allowed.

Print This Post Print This Post

One Response to “Rails on Leopard - three things to remember”

On November 22nd, 2007 at 7:01 pm Wesley Moxam said:

What wrong with MacPorts?

I installed both Rmagick and MySQL on Leopard via MacPorts without issue. And I definitely consider my system to be “nice ‘n clean” (MacPorts puts everything in /opt/local).

Leave a Reply