andrew burke
dot
me

about

contact

blog

rss

RMagick - oh the humanity!

Posted on: 2006-07-03

Just spent two days trying to get the RMagick package running on my OS X 10.4 PowerBook G4. Typing out long install scripts that just refuse to work correctly, jimmying my rubygems, and poking through Google Groups to find the secret config file adjustment that will make it Just Work.

It's not so much RMagick as RAlchemy or RKabbalah - secret power available only to those who understand the Secret Mysteries.

After getting everything to finally compile - a feat in itself - Ruby would recognize the rmagick gem when I asked it what gems were installed, but when I tried to use it, it wouldn't.

I'm going to use this for some charts and graphs for an upcoming project - so I thought I'd try gruff. Oddly enough, while my own calls to 'include rmagick' came up with nothing, gruff - with exactly the same include code as I had used - generated images perfectly! The only downside was that it took a long time - longer than a dynamic site can really afford to wait. Worth looking at again, in case it was just my messed up installation.

Everything got better when I decided to try Locomotive. It encapsulates Rails environments, staying separate from the system in general, and includes a downloadable module with RMagick correctly installed and configured. And it works.

Yes, it works. Thank whoever it is I should thank for this. Ganesh, remover of obstacles? St. Jude? Well, at least I know to thank Ryan Raaum, who put this together, complete with a slick Cocoa-based control panel. I think I'll get a PayPal account, just to give him some of the money he's saved me in potential lost billable hours from this mess.

What's extra frustrating is that ImageMagick actually worked immediately when I tried using it in PHP last year - no setting of environment variables, no hours of configuring and compiling, no having to install the X11 SDK, FreeType, or separate libraries for JPEG, PNG, and TIFF, no error messages about not being able to find 'Verdana'.

Ruby and Rails are so clean and elegant in so many ways that it's extra frustrating when you have to go through such crazy hoops to get things working properly.

So - if you're having RMagick trouble, or just want to try a cool Rails server management tool, give Locomotive a shot - I'm a believer!

Previous: It's the Little Things - ajax_collection_select and Rails 1.1
Next: DemoCampToronto7