Home Play Pinja Bobbity flop

A blog about Ruby, Rails and other Tech. Mostly.

Back to blog

20th Apr 2007, 6:26am
Rmagick on OSX, bus error

After much fretting, I discovered that using RMagick with ImageMagick on OSX just doesn't work.

Once you have messed around with setting your DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH correctly, all you get when you try to load up rmagick is:

[BUG] Bus Error

Frustrating. But I'm not the only one to have found this. If you read Patrick Lenz's article, you'll see that he found a solution.

So installing GraphicsMagick is the answer. But I was not too keen to follow Patrick's recipe and install Darwin Ports on my system, having just gone to some trouble to install Fink when setting up ImageMagick.

Fink makes a directory /sw on your system, and installs all the software it downloads in there. I used fink to download and install libjpeg, and it worked very well.

However, fink does not know about GraphicsMagick. So you need to install that by hand. Here's how I did it:

  1. Download graphicsmagick, and un zip/tar it.
  2. Set your library path up, make sure it includes your new libjpeg libraries:
    export DYLD_FALLBACK_LIBRARY_PATH=/usr/lib:/usr/local/lib:/sw/lib/
  3. Make sure the build process can find the files from fink:
    export LDFLAGS=-L/sw/lib
    export CPPFLAGS=-I/sw/include
  4. Configure graphicsmagick - don't bother to make the perl extensions:
    ./configure --without-perl
  5. make
  6. sudo make install
Then run sudo gem install RMagick once more to pick up the new libraries.

Note that you need to remove imagemagick from your system before this will work - rmagick prefers it over graphicsmagick.


Back to blog