February 24, 2007
Installing RMagick properly in OSX
I've seen the craziest problems with people installing the RMagick gem before. In this article, I will show you the procedure I use to fix any and all rmagick problems. First, I start by cleaning out any of the following packages:
1 sudo port uninstall imagemagick
2 sudo port uninstall graphicsmagick
3 sudo port uninstall ghostscript
4 sudo port uninstall freetype
5 sudo gem uninstall rmagick
Then, I reinstall them:
1 sudo port install freetype
2 sudo port install ghostscript
3 sudo port install imagemagick
4 sudo port install graphicsmagick
5 sudo gem install rmagick
This software cocktail has solved the following problems:
- RMagick gem won't compile native extensions
- RMagick can't find fonts - This is a really common problem, and we have seen a case where this approach will not solve this problem.
- RMagick renders text incorrectly and/or unreadable in the validates_captcha plugin
ImageScience is an alternative to RMagick which requires fewer native libraries, but not zero unfortunately. It may or may not be easier for you to use, depending on what you need RMagick for (it won't do text rendering, for example).