Installing rmagick (2.13.1) with native extensions – Problem!



Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/Users/yourUser/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5… yes
checking for clang… yes
checking for Magick-config… yes
checking for ImageMagick version >= 6.4.9… yes
checking for HDRI disabled version of ImageMagick… yes
checking for stdint.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.

Solution(Mac OS X Lion):

brew remove imagemagick 
brew install imagemagick --disable-openmp --from-source
bundle install