title: Installing RMagick gem -- Can't find MagickWand.h
body: <p>I am installing the rmagick gem on OSX 10.6.8, using <code>gem install rmagick</code>, and I am getting the following error</p>
  
  <pre><code>    Can't install RMagick 2.13.1. Can't find MagickWand.h.
  *** 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
      --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/disaacs/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
  
  
  Gem files will remain installed in /Users/disaacs/.rvm/gems/ruby-1.9.3-p125/gems/rmagick-2.13.1 for inspection.
  Results logged to /Users/disaacs/.rvm/gems/ruby-1.9.3-p125/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
  </code></pre>
  
  <p>Looking in the mkmf.log file I see</p>
  
  <pre><code>have_header: checking for wand/MagickWand.h... -------------------- no
  
  "/usr/bin/gcc-4.2 -E -I/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/x86_64-darwin10.8.0 -I/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1/ruby/backward -I/Users/disaacs/.rvm/rubies/ruby-1.9.3-p125/include/ruby-1.9.1 -I.      conftest.c -o conftest.i"
  conftest.c:3:29: error: wand/MagickWand.h: No such file or directory
  </code></pre>
  
  <p>It's true. The file MagickWand.h is not found in any of the directories specific by the <code>-I</code> directives of the <code>gcc-4.2</code> command. <strong>Why not? And how can I fix this?</strong></p>
  
  <p>ImageMagick is installed, using homebrew. If I search my drive I find MagicWand.h installed in <code>/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/MagickWand.h</code>.</p>
  
  <p>I've tried all the suggestions in <a href="https://stackoverflow.com/questions/9050419/cant-install-rmagick-2-13-1-cant-find-magickwand-h">Can&#39;t install RMagick 2.13.1. Can&#39;t find MagickWand.h.</a>, but none of them have worked.</p>
  
  <p><strong>Edit</strong>:
  Another thing to note: I originally had ImagMagick 6.7.0-7 installed using MacPorts, and RMagick installed just fine. Except that it would not work with the CarrierWave gem. So I uninstalled MacPorts and uninstalled RMagick. Then reinstalled ImageMagick using <code>brew install -f imagemagick --disable-openmp</code>, and attempted to reinstall the rmagick gem (which brings me to my current problem). I restarted all terminals at each step, to ensure that my paths were refreshed.</p>