imagemagickのエラーでRSpecが落ちる
RSpecに画像アップロードのテストが含まれているのですが、 軒並みバリデーションエラーになってました。
ActiveRecord::RecordInvalid: バリデーションに失敗しました。 プロフィール画像MiniMagickがファイルを処理できませんでした。画像を確認してください。エラメッセー...279. identify: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/509.
あまり見に覚えがなかったのですが、最近brewで痛い目に合ってるので、Updated Formulaeの巻き添えを食ったのかとおもい
brew upgrade imagemagick
しておきました。
brew info imagemagick imagemagick: stable 7.0.7-28 (bottled), HEAD Tools and libraries to manipulate images in many formats https://www.imagemagick.org/ /usr/local/Cellar/imagemagick/7.0.5-4 (1,522 files, 22.6MB) Poured from bottle on 2017-04-03 at 12:58:14 /usr/local/Cellar/imagemagick/7.0.7-28 (1,526 files, 23.2MB) * Poured from bottle on 2018-03-30 at 20:43:27 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/imagemagick.rb
再度 spec を実行するとうまくいきました。怖いですね。。