dockblog hamburg logo

RMagick under Mac OS X 10.4.9

Vielleicht auch für nicht Deutsch Sprechende interessant, daher in Englisch…

Installing RMagick under Mac OS X 10.4.9 (Tiger) was really a pain in the ass! There are a few howtos around there, but none of them fully helped me. The support-forum of ruby forge was nice, but not that helpful. Thanks to Tim anyway. That said, here is a quick wrap-up of my odyssey, maybe helpful for others.

This is how it worked – for me, at least

  1. In genereal I follwed the guide at install-osx.htm BUT…
  2. I had X11 already successfully installed, so I was *not* going to use darwinports/macports. I skipped Step 2 and 3
  3. I used Imagemagick 6.3.2. (I was unable to compile GraphicsMagick – Error: png.c: In function ‘ReadOnePNGImage’). I used the configure-options mentioned in the rmagic howto (see above). But I would like to stress that you have to export the following variables:a) export CPPFLAGS=-I/usr/local/include
    b) export LDFLAGS=-L/usr/local/libWithout that, the compilation of RMagick ends with an “[BUG] Bus Error”.
  4. I had to download the ghostscript font package and copy it to /usr/local/share/ghostscript/fonts
  5. Compiled and installed RMagick (I have *not* used the rubygem, because there were some problems too).

Well, I completely removed my original /usr/local, because the RMagick make command ended permanently with

RMagick.bundle (LoadError)
from /usr/local/lib/ruby/site_ruby/1.8/RMagick.rb:11
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules’
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules’
from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup’
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start’

So, hopefully you get it to run without deleting it completely.

Links

Few Links you might find helpfull:

Download

You can download my whole /usr/local uncluding all necessary for running ruby, rails, rmagick here (about 80 MB) if you like.

2 Responses to “RMagick under Mac OS X 10.4.9”

  1. Andreas Korth Says:

    You can have it the easy or the complicated way. You chose the latter one. What’s the problem with using MacPorts?

    You simply need to install these ports:

    jpeg, libpng, libwmf, freetype, ghostscript and graphicsmagick OR imagemagick

    and then

    gem install rmagick

    It’s as easy as that. So you might want to consider doing yourself a favor and get MacPorts. Then update this post to save others from the pain you’ve been through.

  2. Kai Pier Says:

    Hey Andreas,

    I’ve got problems with Macports too. Beside that, I was not quite sure, where I am with these ports. There where Macports and Darwinports. One of them is not longer suppoprted, if I remember correctly. As I said, there where other problems too. I’ve tried it, but can not remember the problems. So I’ve choosen “the complicated way”. At least I now know exactly what happens and how to get it done right with the sources and not with some weired packages. I also use fink and do not want to use another package system. BTW: with fink where some problems too.

    Thanks for your comment!