I am trying to install a Cocoapods fresh on my OSX Yosemite machine. I'm using Ruby 2.1.5 and zsh. Here are my order of steps:
rm -rf ~/.cocoapods
pod setup
[ ~ ] β gem install cocoapods
Fetching: cocoapods-trunk-0.4.1.gem (100%)
Successfully installed cocoapods-trunk-0.4.1
Fetching: cocoapods-try-0.4.2.gem (100%)
Successfully installed cocoapods-try-0.4.2
Fetching: cocoapods-plugins-0.3.2.gem (100%)
Successfully installed cocoapods-plugins-0.3.2
Fetching: cocoapods-downloader-0.8.0.gem (100%)
Successfully installed cocoapods-downloader-0.8.0
Fetching: cocoapods-core-0.35.0.gem (100%)
Successfully installed cocoapods-core-0.35.0
Fetching: cocoapods-0.35.0.gem (100%)
Successfully installed cocoapods-0.35.0
6 gems installed
[ ~ ] β pod setup
Setting up CocoaPods master repo
[!] There was an error reading '/Users/geoff/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
My YAML file referenced in the error looks like this:
---
min: 0.32.1
last: 0.35.0
I can get all of this to work if I uninstall everything and then install and lock my version of Cocoapods to 0.32.1 (and I can use Cocoapods in my project), but if I update to 0.35.0, I can neither successfully run pod setup
nor execute pod install
on my project with 0.35.0.
One further update: @Keithbsmiley mentioned in a forum that it might be a file encoding issue, but after checking my Podfile.lock
and Manifest.lock
and my CocoaPods-version.yml
files in an editor, they have utf-8
encoding.
If I downgrade to Ruby 2.0.0 I am able to setup and install successfully, so I think there is something leaking in from another gem I have installed that was causing the problem. I'm not sure how to go about diagnosing the issue, but I'm happy to provide any further info that could be useful.
What's the output of env | grep LANG
?
LANG=en_US.UTF-8
I deleted every installed gem and started over and things worked. My suspicion is that there's some external dependency that's causing the problem. Here were the gems I had installed at the time of the problem, I took a snapshot before I scorched the earth: https://gist.github.com/geoffharcourt/e0a7dff823b8087baf45
That is very strange indeed...
In my case, I solved the problem by reinstalling Ruby.
# vim ~/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb
def load_string(yaml_string, file_path = nil)
YAML.load(yaml_string)
rescue Exception => e
p e
if yaml_has_merge_error?(yaml_string)
raise Informative, yaml_merge_conflict_msg(yaml_string, file_path)
else
raise Informative, yaml_parsing_error_msg(yaml_string, file_path)
end
end
#<NoMethodError: private method `load' called for Psych:Module>
Same problem.
mac:~ jenkins$ pod setup --verbose
Setting up CocoaPods master repo
Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
$ /usr/bin/git clone 'https://github.com/CocoaPods/Specs.git' master --depth=1
Cloning into 'master'...
Checking out files: 100% (25838/25838), done.
$ /usr/bin/git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[!] There was an error reading '/Users/jenkins/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:316:in `rescue in version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:313:in `version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:234:in `check_version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:57:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/repo.rb:49:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:84:in `add_master_repo'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:40:in `block in run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:32:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
I was able to fix the problem.
I was trying to remember what was installed recently and what might cause the problem. I've also noticed @geoffharcourt has sinatra in his list. So, uninstalled two pods
sudo gem uninstall ocunit2junit
sudo gem uninstall sinatra
Then perform cleanup
sudo gem cleanup
uninstalling manually all the problems, including
sudo gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 sqlite3
sudo gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 nokogiri
sudo gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 libxml-ruby
sudo gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 sqlite3
sudo gem uninstall -i /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0 CFPropertyList
sudo gem uninstall -i /Library/Ruby/Gems/2.0.0 CFPropertyList
After that, clean install of CocoaPods
sudo rm -fr ~/.cocoapods/repos/master
sudo gem uninstall cocoapods
sudo gem update
sudo gem instal cocoapods
pod setup
And problem solved. (dancing)
This is definitely some other gem problem. Hope this might help somebody else.
I had the same problem but I traced it to the new version of the gem psych. I uninstalled it and installed the version 2.0.0 and I solved my problem.
sudo gem uninstall psych
sudo gem install psych -v 2.0.0
It seems that the issue is the in the new version the YAML.load function (that is used in cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb) is private in the new version, so it fails to parse the CocoaPods-version.yml.
i had the same problem and did the delete every gem and reinstall. That seems to be the for sure fix.
I also have the same problem, then , i get the solution from @csknns. This issue cause me 3 days , e...
Same Problem here. Going back to v2.0.0 of the psych gem fixed it for me, too.
Same here. Reverting psych fixed it.
Same here. Reverting psych fixed it.
What is the problem version of psych?
2.0.8 was a problem version for me, 2.0.5 worked.
Psych.load
is public in 2.0.8... https://github.com/tenderlove/psych/blob/v2.0.8/lib/psych.rb#L244.
OK, but I just ran it with psych 2.0.8 installed, it failed, then I uninstalled psych 2.0.8 and then it ran successfully with 2.0.5 only on my machine:
[ ~ ] β pod setup
Setting up CocoaPods master repo
First, rewinding head to replay your work on top of it...
Fast-forwarded master to a38c41856f139c193cfcf7d966a91f4f4c2eac56.
From https://github.com/CocoaPods/Specs
c45ff37..a38c418 master -> origin/master
[!] There was an error reading '/Users/geoff/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
[ ~ ] β gem uninstall psych
Successfully uninstalled psych-2.0.8
[ ~ ] β pod setup
Setting up CocoaPods master repo
Current branch master is up to date.
Setup completed
[ ~ ] β
It may be that Psych.load
isn't the issue (I saw a previous commenter trace to that problem, apologies for throwing you off the trail if I was wrong), but the 2.0.8 version of the gem is definitely having some kind of bad interaction with cocoapods.
I just installed psych 2.0.8 and pod setup
works fine...
Hrm. I just added psych 2.0.8 back and pod setup
immediately failed again.
Here are a couple of other details that might be relevant:
@geoffharcourt I too am using Ruby 2.1.5 and rbenv. This is indeed very mysterious.
I was also unable to reproduce it, with either Ruby 2.1.5 or 2.0.0 - even when deliberately destroying the copy of Psych that ships with those Rubies.
Could one of you experiencing the problem add the following to _sources_manager.rb_, line 316:
puts e.message
puts e.backtrace.join("\n")
that way we can see the actual exception.
We should probably also change those catch-statements so that we can at least see actual exceptions in verbose mode?
Hi @neonichu, here's my output after adding those debug statements:
[ cocoapods ] β gem install cocoapods-0.35.0.gem
Successfully installed cocoapods-0.35.0
1 gem installed
[ cocoapods ] β pod setup
Setting up CocoaPods master repo
Current branch master is up to date.
[!] ERROR: Parsing unable to continue due to parsing error:
contained in the file located at /Users/geoff/.cocoapods/repos/master/CocoaPods-version.yml
---
min: 0.32.1
last: 0.35.0
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb:60:in `rescue in load_string'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb:55:in `load_string'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb:73:in `load_file'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:314:in `version_information'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:234:in `check_version_information'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:205:in `block (2 levels) in update'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:193:in `block in update'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:192:in `each'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:192:in `update'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:92:in `update_master_repo'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:36:in `block in run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:32:in `run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/Users/geoff/.rbenv/versions/2.1.5/bin/pod:23:in `load'
/Users/geoff/.rbenv/versions/2.1.5/bin/pod:23:in `<main>'
[!] There was an error reading '/Users/geoff/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
@geoffharcourt Thanks, unfortunately another catch masking the underlying error.
Could you also add:
puts $!, $@
in line 57 of _/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb_ please?
Here's the new section that's relevant after that change, @neonichu:
private method `load' called for Psych:Module
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb:55:in `load_string'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb:74:in `load_file'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:314:in `version_information'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:234:in `check_version_information'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:205:in `block (2 levels) in update'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:193:in `block in update'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:192:in `each'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/sources_manager.rb:192:in `update'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:92:in `update_master_repo'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:36:in `block in run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command/setup.rb:32:in `run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Users/geoff/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/Users/geoff/.rbenv/versions/2.1.5/bin/pod:23:in `load'
This seems to fit with the earlier suggestion by @csknns that there was something with public/private scope that was contributing to the problem.
(BTW, thank you very much for assisting here. I'm new to iOS development, and very much want to be able to use Cocoapods in my workflow.)
Yep, Psych.load
seems to be the way to go for the newer version, instead of YAML.load
. Judging from other gems, something like this should be done:
if defined?(Psych) and defined?(Psych::VERSION)
Psych.load(yaml_string)
else
YAML.load(yaml_string)
end
@geoffharcourt could you try out replacing the existing YAML.load
statement with the snippet above and see if that fixes it?
Still mysterious why me and @segiddins can't reproduce it. I think @alloy magic will be required to understand it :)
YAML is aliased to Psych in ruby 1.9.3 and later.
-Samuel E. Giddins
On Dec 16, 2014, at 3:15 PM, Boris BΓΌgling [email protected] wrote:
Yep, Psych.load seems to be the way to go for the newer version, instead of YAML.load. Judging from other gems, something like this should be done:
if defined?(Psych) and defined?(Psych::VERSION)
Psych.load(yaml_string)
else
YAML.load(yaml_string)
end
@geoffharcourt could you try out replacing the existing YAML.load statement with the snippet above and see if that fixes it?
Still mysterious why me and @segiddins can't reproduce it. I think @alloy magic will be required to understand it :)
β
Reply to this email directly or view it on GitHub.
@segiddins my bad - that's why I couldn't figure out where YAML
was defined :)
@neonichu, assuming from @segiddins' comment that your instructions wouldn't fix the problem (I attempted JIC and no joy there).
Same here. Reverting psych fixed it. (copy&paste)
No idea what change is causing the problem between 2.0.0 and 2.0.8. Any ideas? @alloy ?
I'll try to git bisect
it.
EDIT: Hm that's odd. I am now unable to reproduce it.. Can someone who is still experiencing the error please bisect it?
I just ran into this issue as well. I was able to get past it by doing:
rm -fr ~/.cocoapods
gem cleanup
gem install psych -v 2.0.0
gem uninstall psych -v 2.0.10
pod setup
I executed those commands in that order, in retrospect I would have tried uninstalling then cleaning...
I don't know if the gem cleanup was necessary.
@brendanmartens works fine for me. :+1:
finally, @brendanmartens me too. Thanks!
In my case i had 2 psych versions :
psych-2.0.6
psych-2.0.11
uninstalled both and then reinstalled psych-2.0.11
this fixed the problem
Same here. Reverting psych fixed it.
Latest psych-2.0.13 fixes the issue :clap:
2.0.5 worked for me. Thanks for the solution.
@dmi3j solution worked for me, thanks
psych-2.0.0 works for me.
Thanks @csknns
Please reopen the issue. I have this problem too and version of gem psych is 2.0.13:
* LOCAL GEMS *
activesupport (4.2.1)
awesome_print (1.6.1)
bigdecimal (1.2.4)
builder (3.2.2)
bundler (1.6.2)
bundler-unload (1.0.2)
calabash-common (0.0.1)
calabash-cucumber (0.12.3)
CFPropertyList (2.3.1)
claide (0.8.1)
clamp (0.6.4)
cocoapods (0.36.3)
cocoapods-core (0.36.3)
cocoapods-downloader (0.9.0)
cocoapods-plugins (0.4.2)
cocoapods-trunk (0.6.0)
cocoapods-try (0.4.3)
colored (1.2)
cucumber (1.3.19)
diff-lcs (1.2.5)
edn (1.0.6)
escape (0.0.4)
executable-hooks (1.3.2)
fuzzy_match (2.0.4)
gem-wrappers (1.2.4)
geocoder (1.2.8)
gherkin (2.12.2)
httpclient (2.6.0.1)
i18n (0.7.0)
io-console (0.4.2)
json (1.8.2, 1.8.1)
json_pure (1.8.1)
mime-types (1.25.1)
mini_portile (0.6.2)
minitest (5.5.1, 4.7.5)
molinillo (0.2.3)
multi_json (1.11.0)
multi_test (0.1.2)
nap (0.8.0)
netrc (0.7.8)
nokogiri (1.6.6.2)
open4 (1.3.4)
psych (2.0.13)
rack (1.6.0)
rack-protection (1.5.3)
rake (10.1.0)
rdoc (4.1.0)
rest-client (1.6.8)
retriable (1.4.1, 1.3.3.1)
rubygems-bundler (1.4.4)
rubyzip (1.1.6)
run_loop (1.2.9)
rvm (1.11.3.9)
sim_launcher (0.4.13)
sinatra (1.4.6)
slather (1.6.0)
slowhandcuke (0.0.3)
test-unit (2.1.2.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
tzinfo (1.2.2)
xamarin-test-cloud (0.9.35)
xcodeproj (0.23.1)
Doesn't make sense to reopen if there is nothing actionable we can do about it. If you have found this to be an actual issue in CocoaPods, please share.
Similar issue, with a twist: Cocoapods 0.36.3 works fine, and has for weeks.
I just upgraded to Cocoapods 0.36.4 and now getting these errors:
β pod update
Update all pods
[!] ERROR: Parsing unable to continue due to parsing error:
contained in the file located at /Users/joel/git/BoxbeeStorage/Frisbee/Podfile.lock
β rm -rf ~/.cocoapods
β pod install
Analyzing dependencies
Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git`
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.
β pod --version
0.36.4
β env | grep LANG
LANG=en_US.UTF-8
I disagree with @kashif. psych-2.0.13
does not work for me. The only thing that works is reverting back to psych-2.0.8
that is bundled with ruby-2.2.1
.
$ gem list
*** LOCAL GEMS ***
psych (2.0.8)
$ ruby -v
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
$ pod update
Update all pods
Analyzing dependencies
...
Generating Pods project
Integrating client project
$ gem update psych
Updating installed gems
Updating psych
Fetching: psych-2.0.13.gem (100%)
Building native extensions. This could take a while...
Successfully installed psych-2.0.13
Parsing documentation for psych-2.0.13
Installing ri documentation for psych-2.0.13
Installing darkfish documentation for psych-2.0.13
Done installing documentation for psych after 2 seconds
Parsing documentation for psych-2.0.13
Done installing documentation for psych after 1 seconds
Gems updated: psych
$ pod update
Update all pods
[!] ERROR: Parsing unable to continue due to parsing error:
$ gem uninstall psych
Successfully uninstalled psych-2.0.13
$ pod update
Update all pods
Analyzing dependencies
...
Generating Pods project
Integrating client project
dear @esetnik yes it seems the error you get now is not the original error of this issue... any idea what the missing line is?
The psych problem seems to cause both:
$ pod update
Update all pods
[!] ERROR: Parsing unable to continue due to parsing error:
and
$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '/Users/geoff/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
The latter was the original reported issue. I'm just sharing that this issue is larger than just a broken pod setup
it's also about pod update
as well. It looks like @SixArm also reports the same.
@esetnik can you also kindly try with cocopods beta? 0.37.0.beta.1
Not working on the beta unfortunately.
$ gem install cocoapods --pre
Fetching: xcodeproj-0.24.0.gem (100%)
Successfully installed xcodeproj-0.24.0
Fetching: cocoapods-core-0.37.0.beta.1.gem (100%)
Successfully installed cocoapods-core-0.37.0.beta.1
Fetching: cocoapods-0.37.0.beta.1.gem (100%)
Successfully installed cocoapods-0.37.0.beta.1
Parsing documentation for xcodeproj-0.24.0
Installing ri documentation for xcodeproj-0.24.0
Parsing documentation for cocoapods-core-0.37.0.beta.1
Installing ri documentation for cocoapods-core-0.37.0.beta.1
Parsing documentation for cocoapods-0.37.0.beta.1
Installing ri documentation for cocoapods-0.37.0.beta.1
Done installing documentation for xcodeproj, cocoapods-core, cocoapods after 7 seconds
3 gems installed
$ pod update
Update all pods
[!] ERROR: Parsing unable to continue due to parsing error:
$ gem uninstall psych
Successfully uninstalled psych-2.0.13
$ pod update
Update all pods
Analyzing dependencies
...
That was a headache - Thanks @csknns
rvm use 2.2.1 fixed for me.
@dmi3j's solution works if the following error occurs using Cocoapods 0.37.1 and Psych 2.0.13.
$ pod setup
Setting up CocoaPods master repo
[!] There was an error reading '/Users/jhack/.cocoapods/repos/master/CocoaPods-version.yml'.
Please consult http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ for more information.
Also reported at https://github.com/bbatsov/rubocop/issues/1510 -- someone said it might be a RubyGems bug?
Could this occur to someone who uses rbenv
without proper maintenance / rehashing? Or is it a general problem that will occur with updating gems in general? I just had the same problem; pod
broke after gem update
with issues related to the version.yml.
Rehashing (if you use rbenv
), removing CocoaPods / ~/.cocoapods
, followed by gem update --system
fixed this for me if anyone is still stuck on this.
This issue happened to me even after rehashing.
On Jun 27, 2015 1:08 AM, "Sam Moore" [email protected] wrote:
Could this occur to someone who uses rbenv without proper maintenance /
rehashing? Or is it a general problem that will occur with updating gems in
general? I just had the same problem; pod broke after gem update.β
Reply to this email directly or view it on GitHub
https://github.com/CocoaPods/CocoaPods/issues/2908#issuecomment-115913518
.
There was an error reading '/Users/sotsys0156/.cocoapods/repos/master/CocoaPods-version.yml
Solved by using following command:
sudo rm -fr ~/.cocoapods/repos/master/CocoaPods-version.yml
This did it for me:
gem cleanup
The instructions that were given on the website given by CL were not valid.
The instructions that did not work for me were: http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
gem cleanup
worked for me too.
Background: Initially I had gem list
gave me psych (2.0.15, 2.0.5, 2.0.0)
. After reading about comments, I performed gem uninstall psych
which left me with gem list
of psych (2.0.15, 2.0.5, 2.0.0)
.. Then I did gem cleanup
and follow up pod install
worked immediately.
Seems to me that removing the psych gem fixes this completely. I wonder what continues to cause this to be an issue. The installed version of psych was psych-2.0.15.
Doing
worked as well
also ran into this today, but neither fixes worked for me
ended up checking out a pre-update version from my git
Reverting psych (from 2.0.15 to 2.0.8) fixed this for me as well.
I reinstalled ruby, cocoapods...but only Reverting psych to 2.0.0 works
Thank you for posting the psych version fix! Major help and fixed this for me as well.
sudo gem cleanup
did the trick for me
Most helpful comment
I had the same problem but I traced it to the new version of the gem psych. I uninstalled it and installed the version 2.0.0 and I solved my problem.
It seems that the issue is the in the new version the YAML.load function (that is used in cocoapods-core-0.35.0/lib/cocoapods-core/yaml_helper.rb) is private in the new version, so it fails to parse the CocoaPods-version.yml.