I have been stuck on this issue for a couple hours now and I cannot find a solution. I am running Mavericks and have Xcode 5.0.2 installed (which comes with the Command Line Tools).
My environment:
Sudo gem install cocoapods outputs
kyles-mbp-2:fresh-driver-ios kylechronis$ sudo gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby -rubygems
/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/gems/rake- 0.9.2.2/bin/rake RUBYARCHDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3- p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1 RUBYLIBDIR=/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-13/1.9.1/xcodeproj-0.14.1
/Users/kylechronis/.rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb
checking for -std=c99 option to compiler... yes
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
*** 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.
Is this an issue with CoreFoundation not being found? or using a different version of Ruby? Any help or input would be greatly appreciated.
Installing new Ruby version helped me. Follow these steps
rvm reinstall ruby-2.0.0-p247 --with-gcc=clang --verify-downloads 1
gem install xcodeproj
gem install cocoapods
I found this answer in some old Github issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With