Skip to content

Instantly share code, notes, and snippets.

@hsanchez
Created January 27, 2013 05:07
Show Gist options
  • Save hsanchez/4646490 to your computer and use it in GitHub Desktop.
Save hsanchez/4646490 to your computer and use it in GitHub Desktop.
For those of you who get this error after upgrading to mountain lion:
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/user/.rvm/rubies/ruby-1.9.3-rc1/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 /usr/bin/gcc-4.2... no
No C compiler found in ${ENV['PATH']}. See mkmf.log for details.
*** 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/user/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
Gem files will remain installed in /Users/user/.rvm/gems/ruby-1.9.3-rc1@some_gemset/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/user/.rvm/gems/ruby-1.9.3-rc1@some_gemset/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.
Here's what I did:
1. Install XCode 4.4
2. Install Unix Developer Tools (from apple's website. didn't work from xcode)
3. Instal XQuartz 2.7.2
4. Reinstall ImageMagick (with homebrew)
5. sudo su && cd /usr/bin && ln -s llvm-gcc-4.2 gcc-4.2
6. cd your_app && bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment