Tuesday, March 17, 2009

Installing RMagick with gems

Getting the RMagick ruby gem to install wasn't too bad. Ubuntu has an RMagick package in the apt repository, but I installed a newer version of gems a while ago, and have kind of gone down the road of installing most ruby libraries as gems rather than with the Ubuntu package manager (although that probably would have worked as well).

To get it set up, I just had to install the libgraphicsmanager1-dev package and let apt install it's dependencies. Then I used gem to install rmagick. The default "gem install rmagick" seems to look for ImageMagick, rather than GraphicsMagick, but a little searching led me to this page on the RMagick website, which says how to install the correct gem for GraphicsMagick. You just have to tell gem to install version 1.15.nn, where nn is part of some sort of version number, which, as of this writing, seems to be 1.15.17 (See this RubyForge page and follow the download link to see the newest version).

I haven't actually tried RMagick yet, but at least the gem installs without failing, so hopefully it shouldn't be too hard to reproduce on the Fedora Amazon image. Good luck, everyone!

No comments: