CocoaPods Failed to Install Using Xcode 5.0.2

I’m stuck on this issue for a couple of hours and I can’t find a solution. I start Mavericks and install Xcode 5.0.2 (which comes with command line tools).

My environment:

  • using RVM with ruby ​​version 1.9.3p484
  • Xcode 5.0.2
  • Mac OS 10.9.1
  • Gem 2.2.0
  • Bundler version 1.3.5

Sudo gem sets 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 really a problem with CoreFoundation not found? or using another version of Ruby? Any help or input would be appreciated.

+4
source share
4 answers

Installing a new version of Ruby helped me. Follow these steps.

rvm reinstall ruby-2.0.0-p247 --with-gcc=clang --verify-downloads 1
gem install xcodeproj
gem install cocoapods

Github.

+19

:

http://cocoafactory.com/blog/2013/02/01/troubleshooting-cocoapods-installation/

:

http://railsapps.imtqy.com/installrubyonrails-mac.html

, - , 1.9.3, 2.1.0. , rvm install ruby.

sudo gem --system

- ,

rvm install ruby, 2.1.0

cocoa pods btw...

pod setup master- Cocoadpods:)

+2

, ​​ SO, :

: cocoapods: : gem

http://www.relaxdiego.com/2012/02/using-gcc-when-xcode-43-is-installed.html

i iMac, , cocoapods , . (ruby, gcc) , , .

, ~/.bashrc ~/.bash_profile , virtualenv :

.bashrc:

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Desktop/Programming
source /usr/local/bin/virtualenvwrapper.sh

and in .bash_profile:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 

after commenting out these lines and searching for .bashrc and .bash_profile

$ source ~/.bashrc
$ source ~/.bash_profile

then

$ sudo gem install cocoapods 

worked flawlessly ...

hope this helps someone else in my previously hopeless situation.

0
source

All Articles