0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MacのRMagickのインストールでエラーになる件

0
Posted at

手元の環境は以下


  • Mac
    • macOS High Sierra 10.13.3
  • Ruby
    • ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin17]
  • Rails
    • Rails 5.0.2
  • RMagick
    • 2.16.0

ググってよくある方法としては、なんとかしてhomebrewでinstallしたimagemagickをimagemagick@6force linkさせる等でglobalにimagemagickのバージョンを下げている例を見かけるが、
数あるrepositoryの一つに依存して全体のimagemagickのバージョン下げるとかやりたくなかったので何かいい方法ないかと模索したところ、
imagemagick@6をkeg onlyでdownloadした状態で、direnv等で以下を設定した上でbundle install 叩くとcompileうまくいきそうということが判明。
(ただし動作確認まではちゃんとしてないので要注意)

export PKG_CONFIG_PATH=/usr/local/opt/imagemagick@6/lib/pkgconfig

まぁぶっちゃけちゃんとdocker環境作ったりするのが今のトレンドだと正攻法な気もするが、
↑みたいなところでつまるプロジェクトは往々にしてdocker化も結構しんどかったりするので。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?