Monday, August 27, 2007

Installing RMagick on Ubuntu

Well, I ran into this when I was trying to use the attachment_fu plugin from techno-weenie.

Even though RMagick was a little more heavy on the memory comparing to the other alternatives, I still chose it, as a lot of people are using RMagick, and I can find a lot of help on the web if I just google it.

But things aren’t always as easy as it seems ;-)

I got errors like this on my first attempt to install the RMagick gem:
# gem install rmagick
Building native extensions. This could take a while...
configure: error: Can't install RMagick. Can't find Magick-config or GraphicsMagick-config program.

ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.9 for inspection.

Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.9/gem_make.out

Thanks to google and ruby community ;-) I found this reference in less than 10 seconds on google!

Basically, you need to install “libmagick9-dev” package to your ubuntu first.

That’s it!

No comments: