RMagick Gem 설치 에러

진행 중이었던 프로젝트를 젬 업데이트 중에

CarrierWave 와 RMgick 관련 이미지 젬을 업데이트를 하니

다음과 같은 에러가

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/.rvm/gems/ruby-2.4.0/gems/rmagick-2.16.0/ext/RMagick
/Users/.rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20170216-74098-13jer71.rb extconf.rb
checking for gcc... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... no
checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.16.0. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:

To see why this extension failed to compile, please check the mkmf.log which can be found here:


extconf failed, exit code 1

Gem files will remain installed in /Users/.rvm/gems/ruby-2.4.0/gems/rmagick-2.16.0 for inspection.
Results logged to /Users/.rvm/gems/ruby-2.4.0/extensions/x86_64-darwin-16/2.4.0/rmagick-2.16.0/gem_make.out

An error occurred while installing rmagick (2.16.0), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.16.0'` succeeds before bundling.

현재 Imagemagick은 7.0.4(17.2.16 현재)이 나왔고, RMagick은 6.x 버젼까지만 지원이 되고 있었다.

방법은 두가지

$ brew install imagemagick@6 
$ brew link --force imagemagick@6 
출처 : http://stackoverflow.com/questions/41647979/imagemagick-7-with-rmagick-2-16-on-macos-sierra-cant-find-magickwand-h/41747901#41747901
$ cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/
$ git checkout 6f014f2b7f1f9e618fd5c0ae9c93befea671f8be imagemagick.rb
$ brew install imagemagick
출처 : http://qiita.com/gakkie/items/1ec4c0362047154f1690

둘 다 6.x 버젼을 돌리는 것이지만, 나는 후자를 선택했다.