Hold on: I’m not sure that the below works right. Don’t use it yet.
There are lots of instructions out there for installing RMagick, which is a graphics manipulation library used by many Ruby-istas for things like thumbnailing, resizing, etc. I wanted to use it for an internal database I’m building in Rails.
Some of the sites offering instructions:
- The RMagick site itself. This one is tilted toward using Darwin Ports (the BSD-ish way to do third party package management on your mac; I prefer the Debian-ish “Fink”).
- Hivelogic. This one involves manual downloads of tarballs and
configure; make; make installtype loving. I don’t like this way of going about it because you lose the package management features.
But nobody seemed to have a Fink-friendly way to do this.
If you naively try to install with
gem install rmagick, you’ll get something like:
configure: error: Can't install RMagick. Can't find libMagick or one of the dependent libraries. Check the config.log file for more detailed information.
1. Install the needed dependencies from binaries using Fink. 2. Use
gem install to install RMagick (the Ruby bit) itself.
The dependencies include (as best I can tell):
freetype freetype-shlibs imagemagick imagemagick-dev imagemagick-shlibs ghostscript ghostscript-fonts gv libpng-shlibs libjpeg libjpeg-bin libjpeg-shlibs lcms lcms-bin lcms-shlibs libtiff libtiff-bin libtiff-shlibs
Therefore, you should probably be able to install simply by doing:
sudo apt-get install freetype freetype-shlibs imagemagick imagemagick-dev imagemagick-shlibs ghostscript ghostscript-fonts gv libpng-shlibs libjpeg libjpeg-bin libjpeg-shlibs lcms lcms-bin lcms-shlibs libtiff libtiff-bin libtiff-shlibs
sudo gem install rmagick
(I realize that this is probably overkill and that you don’t actually need all those packages above. If you figure out the minimal subset, why don’t you post a similar blog entry of your own?)