Cocoapods with Xcode 6 and 10.10 Yosemite
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?
Solution 1:
- Open Xcode 6
- Open Preferences
- Click the Locations tab
- Change the
Command Line Tools
version toXcode 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
Solution 2:
// Running Xcode6-Beta7 on 10.10 (14A343f)
I have tried all of the above and didn't have any luck. Here's what worked for me:
I installed the latest version of Ruby via Homebrew (took a few minutes)
brew install ruby
then installed Cocoapods as usual
sudo gem install cocoapods
and it worked a treat!