Cocoapods with Xcode 6 and 10.10 Yosemite

cocoapods, osx-yosemite, osx-yosemite-beta, xcode

Solution

- Open Xcode 6

- Open Preferences

- Click the Locations tab

- Change the `Command Line Tools` version to `Xcode 6.0`

- Uninstall cocoapods `$ sudo gem uninstall cocoapods`

- Uninstall xcodeproj `$ sudo gem uninstall xcodeproj`

- Install xcodeproj `$ sudo gem install xcodeproj`

- Install cocoapods `$ sudo gem install cocoapods`

- Run `pod --version` to verify that it worked

Problem

After initially upgrading to 10.10 and XCode6-Beta, I tried to run 'pod update' and I received this error: ``` cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError) ``` I tried to update Cocoapods using 'sudo gem install cocoapods', but received another error: ``` Fetching: xcodeproj-0.17.0.gem (100%) 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-10.1.1/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. ``` Has anyone else been able to successfully use Cocoapods with Xcode 6 on 10.10 Yosemite?

Original source