install rmagick '2.13.2' gem - checking for Magick-config... no
IF you get a Magick-config
error while installing 2.13.2 then rmagick couldn't find imagemagick while installing.
first make sure you have pkg-config
brew update
brew doctor
brew install pkg-config
brew unlink pkg-config && brew link pkg-config
run which pkg-config
to find where its installed, usually its installed at /usr/local/bin/pkg-config
export it as PKGCONFIGPATH:
export PKG_CONFIG_PATH="/usr/local/bin/pkg-config"
Make sure you have ImageMagick and know which version you're running.
brew install imagemagick
brew unlink imagemagick && brew link imagemagick
# NOTE YOUR VERSION
export this path:
C_INCLUDE_PATH="/usr/local/Cellar/imagemagick/[version]/include/ImageMagick-6"
find libtool
ls /usr/local/Cellar/libtool/
=> 2.4.4
Export these paths:
LDFLAGS="-L/usr/local/Cellar/libtool/[version]/lib"
CPPFLAGS="-I/usr/local/Cellar/libtool/[version]/include"
The final exports should have looked something like this:
export C_INCLUDE_PATH="/usr/local/Cellar/imagemagick/6.9.0-3/include/ImageMagick-6"
export LDFLAGS="-L/usr/local/Cellar/libtool/2.4.4/lib"
export CPPFLAGS="-I/usr/local/Cellar/libtool/2.4.4/include"
now install the rmagick:
gem install rmagick -v '2.13.2'
Written by Blair Anderson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#