Install rmagick on OS X Mountain Lion
If you have to crop or manipulate images with Ruby sometimes you may consider using ImageMagick , an open source library to handle image editing.
After having a lot of trouble installing ImageMagick via homebrew on OS X Mountain Lion and several workarounds from the internet not fixing the issue, I was able to fix it with this solution:
First, download the ImageMagick installer.
After installing ImageMagick, return to your terminal and adjust your $PATH</code> to the newly installed ImageMagick bin</code> directory:
export PATH=/opt/ImageMagick/bin:$PATH
Next step is to publicize your system with the ImageMagick source headers by extending
PKG_CONFIG_PATH
Here we go:
export PKG_CONFIG_PATH="/opt/ImageMagick/lib/pkgconfig:$PKG_CONFIG_PATH"
Now it's time for the last step, installing the RMagick gem.
If you're Bundler based:
bundle install
If you're working with rubygems directly:
gem install rmagick
Happy rmagicking.
Written by Daniel Schmidt
Related protips
4 Responses
A quick intro won't hurt for some of us that don't know the famous "ImageMagick"
I updated the pro tip with a short introduction.
Thanks. After fighting for hours, this was the solution
thaaanks,. save my day :D