Install ruby
sudo apt-get install ruby1.9.1 rubygems1.9.1
Install imagemagick
sudo apt-get install imagemagick
Tried to install rmagick
sudo gem install rmagick
Got this error:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1:in `'
Found this page, which pointed med to install ruby1.9.1-dev package.
sudo apt-get install ruby1.9.1-dev
Ok, trying again to install rmagick
sudo gem install rmagick
Got this error:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Found this question on superuser.com which pointed me to install the libmagickwand-dev-package.
sudo apt-get install libmagickwand-dev
Finally, another attempt to install rmagick
sudo gem install rmagick
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1...
Updating class cache with 0 classes...
Installing RDoc documentation for rmagick-2.13.1...
Success!