Reputation: 2435
I've been struggling with this for a while. I'm running Mac OS 10.7 (Mountain Lion), and I'm trying to install the RMagick gem so I can use it in my Rails 3 app. I already installed imagemagick with homebrew, and that seemed to finish successfully. I also installed the XQuartz package. When I add 'rmagick' to my gemfile and run bundle install, I get this error:
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Andrew/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for clang... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /Users/Andrew/.rvm/rubies/ruby-1.9.3-p125/bin:/Users/Andrew/.rvm/gems/ruby-1.9.3-p125@global/bin:/Users/Andrew/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin
*** 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/Andrew/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
Gem files will remain installed in /Users/Andrew/.rvm/gems/ruby-1.9.3-p125@global/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/Andrew/.rvm/gems/ruby-1.9.3-p125@global/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.
Process finished with exit code 5
Any idea why this is happening?
Upvotes: 3
Views: 1673
Reputation: 2435
Fixed it by following these steps. Arrggh!
Upvotes: 1