CocoaPods/CocoaPods — Issue #145: Install Cocoapods using Xcode 4.3
Author: bonkowski
Created: 2012-03-01 22:16:16+00:00
State: open

Hi.

I have installed Xcode 4.3 from the AppStore into Applications. I'm using RVM and have ruby 1.9.2 as default. When running gem install cocoapods the install fails with the following error message:

Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.

/Users/andre/.rvm/rubies/ruby-1.9.2-p290/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
--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/andre/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
/Users/andre/.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/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:446:in `try_compile'
from extconf.rb:24:in `block in

'
from /Users/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
from /Users/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
from /Users/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
from /Users/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from /Users/andre/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from extconf.rb:23:in `

'

Gem files will remain installed in /Users/andre/.rvm/gems/ruby-1.9.2-p290/gems/xcodeproj-0.1.0 for inspection.
Results logged to /Users/andre/.rvm/gems/ruby-1.9.2-p290/gems/xcodeproj-0.1.0/ext/xcodeproj/gem_make.out

I have tried to install the xcode command line tools, both from Xcode and the osx-gcc-installer, without any luck.