It's 2am and like the cat in the picture, I'm a little disgruntled. The one thing I've always disliked about Rails on a Mac is the fact that RMagick is so darn hard to get working properly. You can do it from source, but then you have to update it manually. You can try to use MacPorts, but that's a very fragile process. I had it working in Tiger, but to be quite frank, I'm not sure how that happened and it must have been more of an accident than anything else.
In this installment of a blog, I'm going to be covering how I managed to get RMagick up and running using a combination of RubyGems and MacPorts. I'll start by saying, it was a very clumsy process. After having everything installed manually using a great tutorial on Rails Envy, I decided to scrap that in belief there had to be an easier way. When I tried to use MacPorts and then install the RMagick gem, I kept running into an error about it not being able to find the freetype library. It was indeed on the system (/opt/local/lib/...), but it wasn't where the gem installer was expecting it (/usr/loca/lib/...). Give me a break.
Luckily enough a few hours after we went to a haunted house and grabbed a bite to eat, someone else managed to dig into the problem a little deeper. Turns out Apple's new implementation of OpenGL in Leopard seems to break the default tiff port install.
Normally, you would install Rmagick something like this:
sudo port install ImageMagick
sudo gem install rmagick
In Leopard, you must do it like this:
sudo port install tiff -macosx #disables the linkage with Apple's open gl
sudo port install ImageMagick
sudo gem install rmagick
After doing it this way, RMagick was up and running as were my unit, functional, and integration tests. Here's a look at gems and ports stuff.
Ports installed and active:
dgm@deimos $ port installed
The following ports are currently installed:
bzip2 @1.0.4_1 (active)
expat @2.0.1_0 (active)
fontconfig @2.4.2_1+macosx (active)
freetype @2.3.5_0 (active)
ImageMagick @6.3.6-2_0 (active)
jpeg @6b_2 (active)
libiconv @1.11_6 (active)
libpng @1.2.22_0 (active)
libxml2 @2.6.30_0 (active)
pkgconfig @0.22_0 (active)
tiff @3.8.2_1 (active)
zlib @1.2.3_1 (active)
Gems installed:
actionmailer (1.3.5, 1.3.3)
actionpack (1.13.5, 1.13.3)
actionwebservice (1.2.5, 1.2.3)
activerecord (1.15.5, 1.15.3)
activesupport (1.4.4, 1.4.2)
acts_as_ferret (0.4.1)
capistrano (2.1.0, 2.0.0)
cgi_multipart_eof_fix (2.5.0, 2.2)
coderay (0.7.4.215)
daemons (1.0.7)
dnssd (0.6.0)
fastthread (1.0.1, 1.0)
fcgi (0.8.7)
ferret (0.11.3)
gem_plugin (0.2.3, 0.2.2)
highline (1.2.9)
hoe (1.3.0)
hpricot (0.6)
json (1.1.1)
libxml-ruby (0.3.8.4)
mongrel (1.0.2, 1.0.1)
mongrel_cluster (1.0.3)
needle (1.3.0)
net-sftp (1.1.0)
net-ssh (1.1.2)
palmtree (0.0.6)
rails (1.2.5, 1.2.3)
rake (0.7.3)
rcov (0.8.0.2)
RedCloth (3.0.4)
redgreen (1.2.2)
rmagick (1.15.10)
ruby-openid (1.1.4)
ruby-yadis (0.3.4)
rubyforge (0.4.4)
rubynode (0.1.3)
rvideo (0.9.1)
sources (0.0.1)
sqlite3-ruby (1.2.1)
termios (0.9.4)
ZenTest (3.6.1)
What a headache this one was though, hope others find this helpful!

