If the message says you are missing a lib:
I got same problem and it was fixed after running pod setup
and then pod install
If the missing directory is the ruby dir you can do:
You have probably updated your osx or ruby gem recently and its PATH is still linking to the old ruby version. Fix with:
sudo gem install -n /usr/local/bin ruby
sudo gem install -n /usr/local/bin cocoapods
As said by @rendel
Cocoapods had an issue where their github repository had become corrupted, and this forces users to clean up their local repo manually.
A quote from the Cocoapods blog post detailing the error:
Unfortunately we've encountered a bug in libgit2 and we are going to have to force push into the Specs repository. (Also known as the ‘master’ spec repo.)
What does this mean for you? Well, basically your CocoaPods setup is going to break. You are going to have to manually delete any local copies of the Specs repository and re-clone the new version of the Specs repository. You can do that with the following commands:
$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup
Simply running the commands above will remove the corrupted repo and reinitialize using a clean repo. See the blogpost mentioned above for more information.
Hope this helps!
I had similar issue. I deleted Pods folder and run pod install again. Problem solved.
Nothing worked for me, I had to sudo gem install cocoapods
and that did the magic.
Tried a ton of stuff and the only fix for me was saying
brew install cocoapods
and then
brew link --overwrite cocoapods
Now it seems to be working fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With