Gem Install PG mysterious error extconf.rb related - ruby-on-rails-3

I am trying to update my pg gem and I am getting the following error
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/larson/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config
Using config values from /Library/PostgreSQL/9.1/bin/pg_config
checking for libpq-fe.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
--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/larson/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
/Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:853:in `block in find_header'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from /Users/larson/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:852:in `find_header'
from extconf.rb:40:in `<main>'
Gem files will remain installed in /Users/larson/.rvm/gems/ruby-1.9.2-p290/gems/pg-0.13.2 for inspection.
Results logged to /Users/larson/.rvm/gems/ruby-1.9.2-p290/gems/pg-0.13.2/ext/gem_make.out
I tried searching for the mkmf.log file and couldn't find it. I tried a couple of approaches, including putting the directory of the pg_conf file but nothing has worked so far. I am trying this on 10.6.8. snow leopard and my ruby is 1.9.2-p290. I have pg 9.1 installed.
I tried this:
gem install pg
gem install pg -- --with-pg-config=/usr/local/bin/pg_config
This issue appeared after I replaced my macbook pro hard drive and restored the system via time machine. Should I reinstall XCode? Any other suggestions?

I had a similar problem. I got round it by updating rvm:
rvm get latest
rvm reload
rvm --force install 1.9.2

Related

Unable to install Cocoapods on Yosemite DP 7

I am having trouble installing Cocoapods on Yosemite DP 7 installed on a separate partition. I already attempted following the instructions found on Cocoapods with Xcode 6 and 10.10 Yosemite and in the issue(https://github.com/CocoaPods/CocoaPods/issues/2219) closed due to the same solution proposed on the Stack Overflow link.
I continue to get the following error:
Rasmuss-MacBook-Pro:~ rasmusth$ sudo gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
"/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby" -rubygems /Library/Ruby/Gems/2.0.0/gems/rake-0.9.6/bin/rake RUBYARCHDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext RUBYLIBDIR=/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from extconf.rb:24:in `block in <main>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from extconf.rb:23:in `<main>'
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext/xcodeproj/Rakefile:37:in `block in <top (required)>'
Tasks: TOP => default => ext
(See full trace by running task with --trace)
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/ext/xcodeproj/gem_make.out
I am suspecting that this may have to do with the fact that I have Yosemite on a separate partition, but otherwise I am clueless.
I ran into the same issue. After much hair pulling following the same steps as everyone else, the following worked.
$ xcode-select --install (to confirm command line tools are installed)
Installed nvm stable (and homebrew): $ \curl -sSL https://get.rvm.io | bash -s stable
close/reopen terminal
Installed ruby 2.1.2: $ rvm install 2.1
Switch to it: $ rvm use 2.1
Uninstall/reinstall xcodeproj and cocoapods
Xcode 6.0 GM is missing the 10.10 SDK and therefore the gem xcodeproj can't be compiled which has some C code in it which needs the 10.10 SDK.
This is going to be fixed in the future.
For now you can work around it like this:
Terminal: sudo gem uninstall cocoapods xcodeproj
Download Xcode 6.1 (right now Beta 2 is the current one)
Start it go to Settings -> Location -> Command Line Tools -> Change to Xcode 6.1 Beta
Terminal: sudo gem install cocoapods
Change your Command Line tools back to GM (if you want/need)
For more information see: https://github.com/CocoaPods/CocoaPods/issues/2432

Bundle Install Fails with unicorn gem on kgio install

I tried to add the unicorn gem to my gem file and when I run bundle install I get the following error:
Installing kgio (2.8.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for CLOCK_MONOTONIC in time.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
--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=/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:686:in `macro_defined?'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:822:in `block in have_macro'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/mkmf.rb:821:in `have_macro'
from extconf.rb:5:in `<main>'
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/kgio-2.8.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p392/gems/kgio-2.8.1/ext/kgio/gem_make.out
An error occurred while installing kgio (2.8.1), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.8.1'` succeeds before bundling.
Prior to including the unicorn gem I have no problems running bundle install. It appears to be failing while trying to install kgio 2.8.1. I've searched for solutions on Stackoverflow and elsewhere, the most common solution appears to be to install the Xcode development tools. I've done this and it has not resolved the issue.
I'm running Mac OSX 10.9.1 Mavericks with Ruby 1.9.3p392. Really need to get this resolved, any help would be very much appreciated.
I updated to Ruby 2.1 and the problem was resolved.

Can't install rmagick gem on Mountain Lion

Note: my situation is almost identical to this: Can't install pg gem on Mountain Lion.
I just upgraded from Snow Leopard to Mountain Lion and Rails is giving me all kinds of problems, especially trying to install the 'rmagick' gem. I'm running Ruby 1.9.3-p362 and Rails 3.2.11.
➜ git:(master) ✗ sudo gem install rmagick -v 2.13.1
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc-4.2... yes
checking for Magick-config... yes
Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
/opt/local/bin/Magick-config reports version 6.6.6 Q8 is installed in /opt/local
/OPT/LOCAL/BIN/Magick-config reports version 6.6.6 Q8 is installed in /opt/local
/USR/LOCAL/BIN/Magick-config reports version 6.8.0 Q16 is installed in /USR/LOCAL/Cellar/imagemagick/6.8.0-10
Using 6.6.6 Q8 from /opt/local.
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.
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/sscirrus/.rvm/rubies/ruby-1.9.2-p320/bin/ruby
/Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from /Users/sscirrus/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'
from extconf.rb:193:in `<main>'
Gem files will remain installed in /Users/sscirrus/.rvm/gems/ruby-1.9.2-p320/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/sscirrus/.rvm/gems/ruby-1.9.2-p320/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
➜ applyco git:(master) ✗ brew install imagemagick --disable-openmp
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
Error: imagemagick-6.8.0-10 already installed
➜ applyco git:(master) ✗ apt-get install libmagick9-dev
zsh: command not found: apt-get
I have tried:
Installing Xcode with command line tools
Reinstalling homebrew
Clearing out all my repo's gems (including Gemfile.lock) and running bundle install
Reinstalling the bundler gem
Reinstalling ImageMagick
Nothing, including answers elsewhere on SO, have been of any use. Can you point me in the right direction?
I had the same problem as you setting up my dev environment on Mountain Lion for RoR 3.2.11. Apparently the last version of RMagick (2.13.1 ) doesn't play nice compiling with the last version of ImageMagick (6.8.2-0). Disabling openmp and building from source worked like, ahem.. Magick.
brew uninstall imagemagick
brew install imagemagick --disable-openmp --build-from-source
gem install rmagick
I didn't need to edit the brew formula described in http://blog.paulopoiati.com/2013/01/28/installing-rmagick-in-mac-os-x-mountain-lion-with-homebrew/, but that would be the next step to try.
I am going through the same issue here...
But one difference, maybe your homebrew its linked to another version of Imagemagick.
So even though imagemagick-6.8.0-10 is installed is not being found.
Try something like
brew unlink imagemagick
then brew link imagemagick
and see what happens.
This fixed my problem
http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
It may be a permissions issue try running
sudo chown -R `whoami` /usr/local
and then try again.
I had the same issue while trying to use Paperclip with Rails 3 for the first time.
Just to sum up previous answers, what worked for me was the following:
sudo chown -R `whoami` /usr/local
brew link --overwrite imagemagick
Thanks!

Installing rmagick gem fails on Mac OS X Lion

On MAC OS X LION while install rmagic gem, I am getting desperately this error:
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/joel/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... 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.
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/joel/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
/Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'
from extconf.rb:193:in `<main>'
Gem files will remain installed in /Users/joel/.rvm/gems/ruby-1.9.2-p290/gems/rmagick-2.13.1 for inspection.
Results logged to /Users/joel/.rvm/gems/ruby-1.9.2-p290/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.
Used this installer to install ImageMagick before hand
http://cactuslab.com/imagemagick/
picked ImageMagick 6.7.3-2 for Mac OS X Lion
I spend a couple of hours on this, hope someone can give me a lead on how to resolve this.
ADDITIONAL ERROR MESSAGE:
Can't install RMagick 2.13.1. Can't find MagickWand.h.
Here what fixed it!
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick gem install rmagick

Installing rmagick on osx 10.7.3 crashed

I got a problem to install rmagick on my osx 10.7.3 lion
I used rvm
Imagemagick is installed with homebrew
gem install rmagick
Fetching: rmagick-2.13.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension
/Users/lion/.rvm/rubies/ruby-1.9.3-p0/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... 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.
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/lion/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
/Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:381:in
try_do': The compiler failed to generate an executable file.
(RuntimeError)
You have to install development tools first.
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:506:in
try_cpp'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:931:in
block in have_header'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:790:in
block in checking_for'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:in
block (2 levels) in postpone'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in
open'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:284:in
block in postpone'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:254:in
open'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:280:in
postpone'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:789:in
checking_for'
from /Users/lion/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/mkmf.rb:930:in
have_header'
from extconf.rb:193:in'
Gem files will remain installed in /Users/lion/.rvm/gems/ruby-1.9.3-p0/gems/rmagick-2.13.1 for
inspection.
Results logged to /Users/lion/.rvm/gems/ruby-1.9.3-p0/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
Did anyone know what i can do to install rmagick correctly?
I'm going to take a guess that it's an upgrade and not pre-installed? I recently upgraded to Lion and had to do something like:
uninstall xcode 3 (there's a non-destructive version of the uninstall script in case you care)
install xcode 4 (free from the app store. big download).
i use macports. i had to uninstall and reinstall them all. you'll need to do the same for homebrew if you haven't already.
symlink or pass on command line the new gcc compiler (rmagick references gcc-4.2, but with xcode 4 it's called llvm-gcc-4.2. look up what that means if you're interested http://llvm.org/)
That pretty much sums up what I had to do. The clue was in the mkmf.log, so definitely look in there and update your question if my answer doesn't do it for you.