rmagickをインストールしたら躓いたのでメモ
参考
ImageMagick 7 with RMagick 2.16 on MacOS Sierra Can't find MagickWand.h
躓いたところ
$ bundle
bundle
The git source `git://github.com/JangoSteve/remotipart.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
The git source `git://github.com/brainspec/enumerize.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.....
# 略
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
# エラーは略
An error occurred while installing rmagick (X.X.X), and Bundler cannot continue.
Make sure that `gem install rmagick -v 'X.X.X'` succeeds before bundling.
rmagickのインストールでつまづく。
言われたとおりに rmagick
を入れてみる。
$ gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
#errorが起きてインストールできない。
解決策
今回予定していた動作をさせる環境では imagemagick6
が必要だったらしく、まずはimagemagick6をbrewで入れる。
$ brew install imagemagick@6
imagemagick@6
に brew link
させる。
$ brew unlink imagemagick
$ brew link --force imagemagick@6
これで正常に rmagick
が gem
でいれることができ、その正常に bundle
が通りました。