Error installing Cocoapods: xcrun: Error: could not stat active Xcode path…

In a recently purchased Apple Mac Mini, I proceeded to setup my iOS and Mac OS X developer tools & documentation. Although the tools installed fine and I could carry on working with my existing projects, when I choose to install Cocoapods, I encountered the following error –

Screen Shot 2013-04-19 at 12.43.42 AM

The nature of the error suggested an issue with the path of Xcode. A quick search in Google revealed a number of useful posts in Stackoverflow, the most relevant post suggested using xcode-select to force the correct path of Xcode.app to be used for Cocoapods installation. I proceeded to install the command line tools for Xcode followed by xcode-select and attempted to install Cocoapods. This time, the Cocoapods installation was quick and successful –

Screen Shot 2013-04-19 at 12.42.44 AM

Hope this helps someone else!

Leave a comment