RMagick is a crazy pain
But what I meant to talk about was RMagick – which is a pain. It’s an image manipulation gem for Ruby that is pretty powerful but totally took down 2 systems I tried to install it on in the last 2 weeks. Back on First Street Live, Clint and I tried to install it on a Mac mini but Mac Ports and Fink started to fight over who was the package management of record and ended up not even being able to find our gems. Why does every package management system assume it’s the only one you’ll ever need? They refuse to play nice with each other. We hosed that Mac mini up so bad we just gave up and wiped it. Damn we suck.
Then, because I refuse to be beaten by something (and I’m a glutton for punishment), I decided to put acts_as_attachment on a little side project website I’m building. Acts_as_attachment is a cool plugin for Rails which lets you link an image to an ActiveRecord class. It makes it real easy to upload images to your website and delete ‘em and resize ‘em and gussy ‘em up real nice. But it requires RMagick, which requires ImageMagick and, yes, there was another point where nothing worked on my machine. But, even though Windows takes a lot crap about being dev-hostile, I was able to recover and install. They key is following the straight and narrow as described at rmagick.rubyforge.org/install-faq.html. You could install ImagickMagick and Rmagick your self but that will never work (even though some of the documentation seems to imply that it would). Follow the advice of the page listed above and install the package ‘cause it will make your life easier.
If you’re looking to live on the edge you might want to check out attachment_fu which is a reworking of acts_as_attachment but with plans to make it more modular so you can replace the dreaded ImageMagick with image_science and file/database storage with Amazon S3 storage. It’s pretty beta right now, but there is some buzz about it.
Comments