Thursday, 19 September 2013

How to install rmagick on Mac OS X Mountain Lion?

How to install rmagick on Mac OS X Mountain Lion?

I'm trying to install rmagick on Mountain Lion.
I've installed ImageMagick successfully by Homebrew, but I can't install
rmagick gem. My ruby environment is managed by rvm and installed ruby
1.8.6.

I've got an error below when tried to install rmagick.
gem install rmagick -v 2.7.2
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/Macmini/.rvm/rubies/ruby-1.8.6-p420/bin/ruby extconf.rb
checking for Ruby version >= 1.8.2... yes
checking for /usr/bin/gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.3.0... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... no
checking for sys/types.h... no
checking for magick/MagickCore.h... no
Can't install RMagick 2.7.2. Can't find MagickCore.h.
The erros shows that counldn't find MagickCore.h, but I found in
/usr/local/Cellar/imagemagick/6.8.6-3/include/ImageMagick-6/magick/MagickCore.h
I guess if I can manage to tell installer this path, it will go well but
I've no idea to do it.
I've googled and found similar questions below.
Can't install rmagick in Mountain Lion
"rmagick" gem installation issue
And tried to pass PKG_CONFIG_PATH and C_INCLUDE_PATH before 'gem install'
command, and wrote them to ~/.bash_profie, and build ImageMagick from
source, but nothing changed.

Does anyone know how to fix it?

No comments:

Post a Comment