Question

I encountered a roadblock in my happy journey so far on my new mac. I have set up RVM to use ruby 1.8.7 on rails 2.3.8 and everything installed smoothly until Rmagick. Below is the error and the mkmf.log output I am new to development and am not able to figure out what is going wrong

Mkmf.log

    checking for Ruby version >= 1.8.5... -------------------- yes

     --------------------

    find_executable: checking for /usr/bin/clang... -------------------- yes

      --------------------

    find_executable: checking for Magick-config... -------------------- no

      --------------------

    Can't install RMagick 2.13.2. Can't find Magick-config in /Users/puranisu/.rvm/gems/ruby-1.8.7-p374/bin:/Users/puranisu/.rvm/gems/ruby-1.8.7-p374@global/bin:/Users/puranisu/.rvm/rubies/ruby-1.8.7-p374/bin:/$

Error

    [puranisu @ /Users]$ gem install rmagick
     Building native extensions.  This could take a while...
     ERROR:  Error installing rmagick:
     ERROR: Failed to build gem native extension.

    /Users/puranisu/.rvm/rubies/ruby-1.8.7-p374/bin/ruby extconf.rb
     checking for Ruby version >= 1.8.5... yes
     checking for /usr/bin/clang... yes
     checking for Magick-config... no
     Can't install RMagick 2.13.2. Can't find Magick-config in       /Users/puranisu/.rvm/gems/ruby-1.8.7-p374/bin:/Users/puranisu/.rvm/gems/ruby-1.8.7-           p374@global/bin:/Users/puranisu/.rvm/rubies/ruby-1.8.7- p374/bin:/Users/puranisu/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin          :/usr/local/bin:/Users/puranisu/.rvm/bin

      *** extconf.rb failed ***
      Could not create Makefile due to some reason, probably lack of
      necessary libraries and/or headers.  Check the mkmf.log file for more
      details.  You may need configuration options.

    Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/puranisu/.rvm/rubies/ruby-1.8.7-p374/bin/ruby


     Gem files will remain installed in /Users/puranisu/.rvm/gems/ruby-1.8.7-p374/gems/rmagick-2.13.2 for inspection. 
     Results logged to /Users/puranisu/.rvm/gems/ruby-1.8.7-p374/gems/rmagick- 2.13.2/ext/RMagick/gem_make.out
Was it helpful?

Solution

Not sure if you have image installed or not. From the error it looks like config is missing. I have used this http://blog.paulopoiati.com/2013/01/28/installing-rmagick-in-mac-os-x-mountain-lion-with-homebrew/ for my installation and it works fine for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top