Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Photo Browser iPhone App Connecting to an API using OAuth Introducing API and OAuth 2.0

martin chibwe
martin chibwe
3,901 Points

I am running Yosemite and I can't install CocoaPods

I have tried the solutions I found on stackoverflow and still can't install it.Need help

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 Install xcodeproj $ sudo gem install xcodeproj Install cocoapods $ sudo gem install cocoapods Run pod --version to verify that it worked

Do you get an error and if you do, could you please paste it here?

4 Answers

Martin,

I had this problem yesterday. As it turns out in Yosemite, you need to upgrade your version of Ruby. I uninstalled xcodeproj, cocoapods, and then followed ONLY the "Install Homebrew" and "Install Ruby" portions of this site

Restart your computer then reinstall xcodeproj and cocoapods. you need to run "pod setup", then can finally run "pod install" in the xcode project directory.

I also found this StackOverflow question helpful

martin chibwe
martin chibwe
3,901 Points

I am getting this error: ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.

You need to uninstall xcodeproj as well (sudo gem uninstall xcodeproj) after selecting Xcode 6 command line tools.

martin chibwe
martin chibwe
3,901 Points

still getting the error