title: Can't install RMagick 2.13.2
body: <p>I am having an issue on OS X Maverick when trying to install the rmagick gem. Following are some details</p>
  
  <p>ImageMagic details</p>
  
  <pre><code>mairs-MacBook-Pro:social-login-in-rails umair$ convert --version
  Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-07-06 http://www.imagemagick.org
  Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
  Features: DPC Modules
  Delegates: bzlib freetype jng jpeg ltdl lzma png xml zlib
  </code></pre>
  
  <p>I tried installing with and without paths but I am unable to install rmagick.
  Error on installing rmagick</p>
  
  <pre><code>Umairs-MacBook-Pro:social-login-in-rails umair$ sudo C_INCLUDE_PATH=/opt/ImageMagick/include/ImageMagick-6/ PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ gem install rmagick
  Building native extensions.  This could take a while...
  /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr in PATH, mode 040777
  ERROR:  Error installing rmagick:
  ERROR: Failed to build gem native extension.
  
  /Users/umair/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
  checking for Ruby version &gt;= 1.8.5... yes
  checking for gcc... yes
  checking for Magick-config... yes
  
  Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
       /usr/local/bin/Magick-config reports version 6.8.9 Q16 is installed in /usr/local/Cellar/imagemagick/6.8.9-1
       /opt/ImageMagick/bin/Magick-config reports version 6.8.8 Q16 is installed in /opt/ImageMagick
  Using 6.8.9 Q16 from /usr/local/Cellar/imagemagick/6.8.9-1.
  
  checking for ImageMagick version &gt;= 6.4.9... yes
  checking for HDRI disabled version of ImageMagick... yes
  /usr/local/bin/Magick-config: line 41: pkg-config: command not found
  /usr/local/bin/Magick-config: line 47: pkg-config: command not found
  /usr/local/bin/Magick-config: line 50: pkg-config: command not found
  /usr/local/bin/Magick-config: line 53: pkg-config: command not found
  checking for stdint.h... yes
  checking for sys/types.h... yes
  checking for wand/MagickWand.h... yes
  /usr/local/bin/Magick-config: line 53: pkg-config: command not found
  Can't install RMagick 2.13.2. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.
  
  *** 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/umair/.rvm/rubies/ruby-2.1.0/bin/ruby
  
  extconf failed, exit code 1
  
  Gem files will remain installed in /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rmagick-2.13.2 for inspection.
  Results logged to /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/rmagick-2.13.2/gem_make.out
  </code></pre>