Install RMagick 2.13.2 in macOS Sierra

less than 1 minute read

Homebrew is usually pretty good at installing ImageMagick and I was wondering why it threw the following error when I tried to configure an old Rails project in macOS Sierra. I had run brew install imagemagick before installing the RMagick gem and still got this -

checking for ruby version >= 1.8.5... yes
checking for /usr/local/cellar/gcc@4.9/4.9.3_1/bin/gcc-4.9... yes
checking for magick-config... no
can't install rmagick 2.13.2. can't find magick-config in <snip>

Turns out Homebrew installed ImageMagick 7.0.4-6 and it doesn't have Magick-config executable in its bin directory, instead it has Magick++-config.

Got the gem installed by downgrading ImageMagick to version 6 as follows.

# Uninstall ImageMagick 7
brew uninstall imagemagick

brew install imagemagick@6
brew link imagemagick@6 --force

Now we can install the gem.

gem install rmagick -v '2.13.2'

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading...