Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods error reading ~/.cocoapods/repos/master/CocoaPods-version.yml after reinstall

Tags:

cocoapods

I performed my normal pod update and received the following message:

[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.

So I followed the instructions in http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/

$ sudo rm -fr ~/.cocoapods/repos/master
$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.

Same error. So I removed cocapods, upgraded ruby and gems, installed cocoapods:

$ sudo rm -fr ~/.cocoapods

$ sudo gem uninstall cocoapods
Remove executables:
    pod, sandbox-pod

in addition to the gem? [Yn]  y
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-0.35.0

$ sudo gem update --system
Latest version currently installed. Aborting.

$ sudo gem update
Updating installed gems
Updating activesupport
Fetching: i18n-0.7.0.gem (100%)
.
.
.

$ sudo gem install cocoapods
Fetching: cocoapods-0.35.0.gem (100%)
Successfully installed cocoapods-0.35.0
Parsing documentation for cocoapods-0.35.0
Installing ri documentation for cocoapods-0.35.0
Done installing documentation for cocoapods after 4 seconds
1 gem installed

$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '~/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.

Just for fun, I also ran pod install.

Same error. Anyone else run into this problem? Solve it? Or see what I am doing wrong? This iOs app has been using pods for a while now. I just added pod 'ZSSRichTextEditor', '~> 0.5' to the Podfile as my most recent change.

Update:

Here is the CocoaPods-version.yml file:

---
min: 0.32.1
last: 0.35.0
like image 250
Kent Avatar asked Dec 20 '14 20:12

Kent


2 Answers

Ok, found the same problem thread on github. Answered by csknns.

Here is how it went for me, re-install psych:

$ sudo gem uninstall psych
Password:

Select gem to uninstall:
 1. psych-2.0.5
 2. psych-2.0.6
 3. psych-2.0.8
 4. All versions
> 4
Successfully uninstalled psych-2.0.5
Successfully uninstalled psych-2.0.6
Successfully uninstalled psych-2.0.8

$ sudo gem install psych -v 2.0.0
Fetching: psych-2.0.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed psych-2.0.0
Parsing documentation for psych-2.0.0
Installing ri documentation for psych-2.0.0
Done installing documentation for psych after 2 seconds
1 gem installed

$ pod setup
Setting up CocoaPods master repo
Already up-to-date.
Setup completed

Hope this helps someone out there!

like image 108
Kent Avatar answered Sep 18 '22 17:09

Kent


This bug seems to be fixed in newer versions of RubyGems. Updating with gem update --system allows me to update to the latest version of psych without breaking CocoaPods.

Credit: https://github.com/CocoaPods/CocoaPods/issues/3539#issuecomment-125106504

like image 36
Tag Avatar answered Sep 18 '22 17:09

Tag