kopongo.com

home

ImageMagick RMagick Bus Error

30 Dec 2006

Installing software on the mac again. This one was not fun, but it did work out fine.

One of my projects uses the very cool RMagick gem, which requires ImageMagick or GraphMagick to be installed. This has always been a step I dread, ever since I unsuccessfully tried to install that whose thing on cygwin a year ago despite much effort.
I have since installed all this on various linux boxes, and it’s usually quite simple.

Not on the Mac.

I first followed the very clear instructions I found at Hivelogic http://hivelogic.com/articles/2006/06/10/rmagick_os_x.

Unfortunately, that did not work. The RMagick gem did not install properly, and I got the now infamous bus error. Something about misc.rb, line 317.

I found some hints here http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/216875,
and tried to install RMagick from source. No good. Same issue.

Then I tried looking around the web, and found many people asking the same questions.
Going down further on the google list of issues for this, I started finding articles telling me to use GraphicsMagick.
http://poocs.net/2005/7/6/making-rmagick-suck-less-with-tiger

Often the solution was something like ‘use graphmagick instead’. Fine, I am sure that would work, but my Linux production servers are setup with ImageMagick. Do I want to use different software in development than I use in production? No way. This has to compile.

I tried to figure out exactly what was going on in this line 317 which was such a problem. Who was not cooperating?

I wondered why hivelogic’s instruction did not quite match up with the compilation instructions at the RMagick site. Finally, I found this: http://blog.labratz.net/articles/2006/10/10/really-truly-getting-imagemagick-rmagick-working-on-osx-from-source-without-using-macports-darwinports-or-fink
I
t’s basically the hivelogic instruction plus the wmf and lcms libraries, and ImageMagick compiled with the instructions at the RMagick site. I added the ghostscript and the fonts as well.

And it works great!