After updating to the latest OS X El Capitan I've faced the same problem with cocoapods as many others:
-bash: pod: command not found
I ran sudo gem install cocoapods
to reinstall cocoapods and it resolved the above issue:
Successfully installed cocoapods-0.38.2
Parsing documentation for cocoapods-0.38.2 1 gem installed
Pod command now works. But when I try to pod install --verbose
it gets stuck:
Preparing
Updating local specs repositories
Updating spec repo `master`
$ /usr/bin/git pull --ff-only
I've tried uninstalling all cocoapods components that I could find with
gem list --local | grep cocoapods
and reinstalling cocoapods all together. Didn't help. What should I do?
It looks like you installation gets stuck when it tries to update the spec repo.
Have you tried deleting the spec repo and downloading it again? This can be achieved running the following commands:
$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup
Let me know if it works.
-------------- UPDATE --------------
Specs are the files that describe the pods, they contain information about the version of the pods, their name and where to fetch the pod, among other things. CocoaPods keeps a repository with all of the updated specs for all of the available Pods, when you install CocoaPods this repo is cloned to your machine, this way, you can search for pods and their specs directly in it. You can read more about it here: Specs & Specs Repo