We upgraded our CrossConnector server software this week, including Rails 1.1 and the latest versions of Ruby and Lighttpd. What should have been a simple upgrade turned into a two-day stress-fest, as we tried to figure out why a couple of our applications just wouldn’t work.

I finally traced the problem to RMagick – Ruby’s ImageMagick interface. Our program uses file_column and Sparklines, which both depend on RMagick. We had elected to upgrade to the latest version of RMagick using “gem upgrade”, and everything worked perfectly, or seemed to. But our apps just wouldn’t load.

The heart of the problem turned out to be that our app was loading RMagick, which in turn was looking for a file called ‘RMagick.so’, which was nowhere on our system. The file was present on our development server, and the app was running flawlessly in development, so I figured that the program was legit and that somehow the file had just been forgotten during installation. I was right. The hard part was figuring out how to get it there. I tried reinstalling RMagic from the gem, downgrading to a previous version, and even copying the RMagick.so file by hand. Nothing. Finally I decided to try compiling RMagick from source. And… Success! Here’s what I did…


sudo gem uninstall RMagick (remove all versions)
cd /usr/local/src (where I keep my source files)
curl -O http://rubyforge.halostatue.info/rmagick/RMagick-1.10.1.tar.gz
tar xzvf RMagick-1.10.1.tar.gz
cd RMagick-1.10.1
./configure
make
sudo make install

Important: you must have ImageMagick or GraphicsMagick and the supporting libraries installed first. Follow the instructions here.

These sites were super-helpful:

Disclaimer: Use this stuff at your own risk. These are not instructions – this is just what worked for us. We can take no responsibility for anything that might happen to your server as a result of following these steps.


4 Responses to “ImageMagick Sorcery on OS X Tiger”

  1. matt Says:
    I SO wish I understood this stuff if for no ther reason than to be able to comment on your indsutrious brilliance. Unfortunatley, I'm only able to point out that your examply code and refernce links extend outside of the content section of your blog on the front page in Firefox/WIN :( and that the right link column shifts below the blog content on that same page in IE/WIN :( :(
  2. Ryan Says:
    Dad-gum. Thanks Matt - good catch. Just a quick overflow:auto in my style sheet cleaned that up.
  3. Ryan Says:
    Oh. I just saw the Internet Explorer problem you're talking about. Man, I hate IE.
  4. matt Says:
    Seriously man - this site is looking FANTASTIC. I LOVE the author's comment style!

Leave a Reply