$ brew install imagemagick@6
This formula is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
$ bundle
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/akira/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rmagick-2.16.0/ext/RMagick
/Users/akira/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20170715-49819-1j4q792.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 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 ***


PATH="$(brew --prefix imagemagick@6)/bin:$PATH" bundle



PKG_CONFIG_PATH="$(brew --prefix imagemagick@6)/lib/pkgconfig" bundle


PKG_CONFIG_PATH="$(brew --prefix imagemagick@6)/lib/pkgconfig:$(pkg-config --variable pc_path pkg-config)" bundle