So getting rmagick 2.12.2 working on Mac OS X isn't the easiest thing in the world, but it is possible.

The first thing I should say is that this assumes you already have ImageMagick installed on your machine, the second thing is that there is a rmagick 2.13.2 gem, which seems to work out of the box.

In my case I couldn't use 2.13.2 so I had to get things working with 2.12.2.

If you Google this issue there are loads of solutions out there, unfortunately all the low hanging fruit didn't work for me, these are things like;

  • Making sure ImageMagick is installed
  • Telling the ruby gem where ImageMagick lives with -- --with-opt-dir

Thanks to this link I was able to get it sorted.

Here is a dump of the fix that you type into the terminal;

cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
ln -s libMagick++-Q16.7.dylib   libMagick++.dylib
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib

Why not read some more of our Ruby posts?