MacOS Sierraでbundleがrmagickのところでつまずく件

晴れてプロダクトにgithub接続していただき、張り切ってgit cloneからのbundle install!!のはずが、

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

    /Users/kosuke_machida/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20170216-72599-1tc1l5t.rb extconf.rb
checking for clang... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... 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.15.4. 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:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/kosuke_machida/.rbenv/versions/2.2.4/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in /Users/kosuke_machida/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rmagick-2.15.4 for inspection.
Results logged to
/Users/kosuke_machida/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-16/2.2.0-static/rmagick-2.15.4/gem_make.out

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

rmagickがインストールできずに止まってしまう。

## とりあえずググってみる
同じことでつまずいてしまう人はやっぱり多いらしく、ググってみると記事がたっぷり。それらが、総じて言うのが

```
brew install imagemagick
```

を実行してみろというものでした。とりあえずインストールしてみて再bundle

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

    /Users/kosuke_machida/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20170216-72599-1tc1l5t.rb extconf.rb
checking for clang... yes
checking for Magick-config... no
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.4.9)... 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.15.4. 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:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/Users/kosuke_machida/.rbenv/versions/2.2.4/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

Gem files will remain installed in /Users/kosuke_machida/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/rmagick-2.15.4 for inspection.
Results logged to
/Users/kosuke_machida/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-16/2.2.0-static/rmagick-2.15.4/gem_make.out

An error occurred while installing rmagick (2.15.4), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.15.4'` succeeds before bundling.
```
変わらんやんけ、、、
その後も色々な記事を参考にして試すも総じてうまくいかず。そんな時浮上してきたのが

## Mac OS Sierraはimagemagick７系と相性悪い説

ものは試し、最新の７系をアンインストールして６系を入れてみる。

```
# ７系をインストールしていない人は不要。一回アンインストール
$ brew uninstall imagemagick
 
$ brew install imagemagick@6

# パスを繋げるのを忘れない
$ brew link --force imagemagick@6
```

結果、、、

```
Installing rmagick 2.15.4 with native extensions
Using rspec-support 3.5.0
・・・
```
通った！本当に相性最悪みたいです。

参考URL：<a src='http://syaka-syaka.blogspot.jp/2017/02/macos-sierrarmagick.html'>syaka-syakaブログ: MacOS Sierraでrmagickが入らない件</a>