Having played around with the latest version of the popular Ubuntu distribution in the last week or so, I thought I’d give a quick guide to installing RMagick. Unlike Breezy, Dapper doesn’t seem to work to well with the RMagick Gem (Norman Timmier has some great advice on installing RMagick under Breezy). Instead, use the following apt-get package command (It’s all one line) to get you up and running…

$ sudo apt-get install imagemagick libmagick9 librmagick-ruby-doc librmagick-ruby1.8

That should see you good. Now if you have the irb package you can test that RMagick is indeed loaded. If you don’t have irb installed, install it as so…

$ sudo apt-get install irb

Now you can test RMagick, remembering that the capitalisation is important here…


$ irb
> require 'RMagick'
=> true
> exit

Updated: If it returns true as in the above example, all is good. If you don’t get the true result, something has gone wrong with the installation, best try again it might still be ok, see Tim Hunter’s comment below to see why, thanks Tim.

I hope this guide makes the installation slightly easier for someone, it took me a while when I transitioned to Dapper, I was still used to using the gem like I do on the Mac.

Did you like my Ruby on Rails related article? Then why not recommend me on Working with Rails?