Posted by yossarian
A lot of the time, your web apps need to chop up, resize, or otherwise mangle images. One program that can do this on the server is ImageMagick. Here's how to get ImageMagick to work with Ruby on Rails on a Debian or Ubuntu box.
If you haven't already done this when you installed Rails, make sure you install Debian's build-essential package so that you can compile code:
sudo apt-get install build-essential
Then:
sudo apt-get install imagemagick
sudo apt-get install librmagick-ruby
sudo apt-get install libmagick9-dev
Update: I've had no success yet when trying to install the latest version of rmagick on Debian machines, although basically I just haven't looked into it very much as the older versions work just fine for me. So, I just use rmagick 1.15.0 instead of the newest (2.3.0) gem.
sudo gem install rmagick -v 1.15.0
Note that libmagick9-dev may have a different version number depending on how old your
distribution is (that one is found on Ubuntu 7.04 Feisty). Older version numbers might
include libmagick9-dev. You should be able to do something like
apt-cache search libmagick
to find out which version is needed on your system.
i wish i used ror so i could read this and say, yay!