I am trying to install cocoapods to my MacBook Pro running with OSX 10.9.1 (new Mavericks) and after type gem install cocoapods
I get the following error:
You need to install Xcode's developer tools. The easiest way to do this is through terminal (this question)
xcode-select --install
I was getting this error and had to completely reinstall cocoapods to fix it. Finally worked. Maybe this solution suits for anyone else.
sudo rm -rf home_folder/.cocoapods/
After that, did again
pod setup
and installed my libraries from zero, and everything worked.
Hope it helps!
Worked for me in 2020 (Mac OS Catalina)
xcode-select --install
sudo gem install -n /usr/local/bin cocoapods
I had multiple environments in my configuration, which was causing problems as rvm was interfering with the installation. Once ruby 2.x was detected the install went fine.
For my environment I did the following: 1. xcode-select --install 2. rvm implode (Note - too drastic - you may not need to do this, I didn't have any use for the older ruby installations, I removed them via rvm uninstall one-by-one and then used rvm implode 3. gem install cocoapods
This time the last command worked without any issues.
if you're also seeing error: active developer path
.. does not exist
you may also have to do this
$ sudo xcode-select --reset