Reputation: 26962
I'm on OSX Snow Leopard though I think this may not be a platform-specific issue.
The problem is I've wasted hours of my life trying to get gem install rmagick
to work and I'm hoping to save the next person that grief.
I believe the core problem is summed up in the title.
Questions:
And finally:
Getting ImageMagick to work at all now is giving me fits because I've tried installing various versions in various ways and they're interfering with each other. Below are instructions for purging and reinstalling macports (is that necessary?) but I'm not sure how to clean up other libraries for doing a fresh ImageMagick install. For example, I currently get the following error trying to run ImageMagick
dyld: Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /usr/local/bin/convert
Reason: Incompatible library version: convert requires version 11.0.0 or later,
but libfreetype.6.dylib provides version 10.0.0
Perhaps just getting rid of /usr/local/lib/libfreetype* before reinstalling suffices (I'll confirm here when I get ImageMagick working) but is there a more complete/definitive way to do a fresh install of a specific version of ImageMagick?
sudo port selfupdate
just to be sure.Upvotes: 2
Views: 1601
Reputation: 26962
Fundamentally, the answer indeed seems to be that you need an older version of ImageMagick for Rmagick to work (at least under Snow Leopard).
I've confirmed that ImageMagick 6.5.6-10 works with Rmagick 2.13.1. (Rmagick homepage says it's been tested up through ImageMagick 6.6.1-0. Version 6.6.1-0 doesn't seem to be available but probably 6.6.1-10, which is available, is fine too.)
All the troubles with MacPorts were probably mostly red herrings. Still, MacPorts does not seem to have a way to install a previous version of ImageMagick so I installed it from source. HomeBrew might be a better option.
The errors I was getting with ImageMagick were solved for me by removing /usr/local/lib/libfreetype* and reinstalling ImageMagick. I also purged and reinstalled MacPorts but I don't know that that was necessary.
Here are the exact steps I took to get this working, as best as I can reconstruct them.
Phew! Note that steps 3-14 could probably be replaced with this: http://github.com/masterkain/ImageMagick-sl
Upvotes: 1
Reputation: 409
I am also stuck trying to install an earlier version of ImageMagick, but I'm trying to do it via Homebrew. Along the way, however, I discovered how to install older packages via MacPorts, and it did work for me (although I had to ditch MacPorts for other reasons).
Instructions for moving to an older port version are here: https://trac.macports.org/wiki/howto/InstallingOlderPort
Upvotes: 1
Reputation: 153
RMagick is an... interesting library. If at all possible, avoid it's usage. If you're just resizing images and other basic things, look at minimagick. The main issue with RMagick stems from memory usage and leaks - not usually apparent in development, but in production they get ugly fast.
My advice would be to look at alternatives if at all possible - if you have to do more complex work, it might actually be preferable to use Python/PIL for that instead (wrapped with Ruby - I use this to get at OpenCV, for example). Depends on your use case.
If you really need RMagick, then Homebrew might work better than ports. I'm a Linux guy where this stuff tends to Just Work, and over there the definitive way to get things like ImageMagick set up properly outside of package managers is to build it from source. Not sure how practical that is on OSX, but it might be worth a shot if all else fails.
Upvotes: 1