OSX
I found a good tutorial here:
http://www.gra2.com/article.php/using-rmagick-imagemagick-rails
for installing this. I'm installing it because I need it for, (what else?) manipulating images:
Well when I first tried to run:
sudo port install imagemagick
I got the nice errors telling me that make couldn't be found... Shesh... so I had to reinstall Xcode and then I had to reinstall zlib:
sudo port upgrade --force zlib
Then it finally built!
Anyway, then it was just:
gem install rmagic.
CentOS 5.5 install
For Linux I thought it would be easier, but it wasn't because my RPMS were older. 6.2 instead of 6.3 or greater. (I'm using
CentOS 5.4 but apparently this isn't new enough)
I thought the answer was a simple yum -y install imagemagick ImageMagick-devel but running gem install rmagic gave me the error:
Can't install RMagick 2.12.2. You must have ImageMagick 6.3.5 or later.
So after trying a few things, I found this blog entry to be the most helpful:
http://andrewduck.name/2009/01/imagemagick-64x-on-centos-5/
(Look at the notes below, that's what I used) and was able to get it installed:
# yum remove ImageMagick
# yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
# tar zxvf Image*gz
# ./configure; make; make install
# gem install rmagick
RHEL 6
This is much easier if you have all the prereq packages that come with the 'Optional Packages'. Unfortunately, there were a ton of packages that I needed that were 'Optional' and I had to crawl through RedHat's RHN to get them:
yum -y install ImageMagick libXt-devel libXext-devel libX11-devel lcms-devel jasper-devel ghostscript-devel ImageMagick-devel