Installing RMagick on Ubuntu

logo-big

Here’s a very quick and easy way to install the RMagick Ruby gem to do some cool image manipulation and thumbnail management.

Install imagemagick & libraries

First install imagemagick on Ubuntu:

Check it’s installed:

Now install libmagick9-dev, making sure you choose the corresponding version for imagemagick *IF* asked (but you shouldn’t be):

Install Gem

Now the easy bit (and more stressful), installing the Ruby Gem:

After which you should see:

Include in your Ruby App

Now let’s use it, by adding to your controller/application_controller.rb:

Tada! Your ready to rock!

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • StumbleUpon
  • Technorati
  • Pownce
  • TwitThis

Tags: , , , ,

2 Responses to “Installing RMagick on Ubuntu”

  1. Antun Karlovac Says:
    August 30th, 2008 at 4:18 pm

    What version of Ubuntu did you install on? I’m using Ubuntu 6.06.2, and apt-get only retrieves ImageMagick 6.2. The RMagick gem then complains that it needs ImageMagick 6.3.

    -Antun

  2. James Says:
    September 1st, 2008 at 9:26 am

    Hi Antun,

    I was running 7.10 I believe when I wrote this, I’ve not actually checked whether the instructions work on other versions (and also, not checked whether they still work!).

    I’ve been working a lot with Mono/.Net and not really looked at Ruby recently… may need to get back into it!

    Sorry, that comment is probably no help… :)

Leave a Reply

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales