3

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?

NKorotkov
  • 3,591
  • 1
  • 24
  • 38
  • Possible duplicate of [cocoapods - 'pod install' takes forever](http://stackoverflow.com/questions/23755974/cocoapods-pod-install-takes-forever) – Cœur Dec 21 '16 at 03:59

1 Answers1

5

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

pedros
  • 1,197
  • 10
  • 18
  • Yeah, it did help! I will accept your answer. Could you please give a brief explanation what's a spec repo? – NKorotkov Oct 06 '15 at 21:10
  • @pedros I am still stuck at it .. tried deleting the existing repo and download again. As I check in activity monitor -> network tab @ git-remote-https : downloaded 23mb and then packets doesn't fetch from github after. I am on El-Capitan I tried with : goto ~/.cocoapods/repos and run 'git clone https://github.com/cocoapods/Specs.git master' struggling 5 days in a row .. nothing works :( – VipiN Negi Sep 08 '16 at 11:57