Cocoapods: `pod` non-functional after 1.0.0 update

Created on 13 May 2016  Â·  13Comments  Â·  Source: CocoaPods/CocoaPods

What did you do?

Updated to 1.0.0

What did you expect to happen?

I was hoping to be able to use cocoapods

What happened instead?

~/c/project (develop âš¡) pod install
[!] ERROR: Parsing unable to continue due to parsing error:
contained in the file located at /Users/tburns/.cocoapods/repos/master/CocoaPods-version.yml

---
min: 0.32.1
last: 1.0.0

CocoaPods Environment

~/c/project (develop âš¡) pod env
[!] ERROR: Parsing unable to continue due to parsing error:
contained in the file located at /Users/tburns/.cocoapods/repos/master/CocoaPods-version.yml

---
min: 0.32.1
last: 1.0.0
~/c/project (develop âš¡) pod --version
1.0.0

Already Tried:

  • Nuking ~/.cocoapods
  • Manually cloning the specs repo
  • removing and reinstalling the gem
  • running commands in various shell envs, just in case (bash, fish, zsh)
awaiting input

Most helpful comment

@benasher44 thank you! I fixed it by completely uninstalling Psych and then running the setup command. I recommend that method for anyone else that has this problem.

gem uninstall psych 
pod setup --verbose

All 13 comments

What ruby version are you running and what version of psych do you have installed?

@segiddins ruby 2.2.2, psych (2.0.17, 2.0.8)

Weird, looks like an issue with your psyche gem, does this work?

$ irb

[1] pry(main)> require 'yaml'
=> true
[2] pry(main)> YAML.load_file("/Users/orta/.cocoapods/repos/master/CocoaPods-version.yml")
=> {"min"=>"0.32.1", "last"=>"1.0.0"}
[1] pry(main)> require 'yaml'
=> true
[2] pry(main)> YAML.load_file("/Users/tburns/.cocoapods/repos/master/CocoaPods-version.yml")
=> {"min"=>"0.32.1", "last"=>"1.0.0"}
[3] pry(main)>

Happy to provide any further information that might help; it's clear that i'm a walking talking edge case on this one 😂

Just in case:

~/c/project (develop âš¡) pod env --verbose
[!] ERROR: Parsing unable to continue due to parsing error:
contained in the file located at /Users/tburns/.cocoapods/repos/master/CocoaPods-version.yml
---
min: 0.32.1
last: 1.0.0


/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/yaml_helper.rb:62:in `rescue in load_string'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/yaml_helper.rb:57:in `load_string'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/yaml_helper.rb:75:in `load_file'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/metadata.rb:27:in `from_file'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source.rb:427:in `refresh_metadata'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source.rb:27:in `initialize'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:287:in `new'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:287:in `block in source_from_path'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:292:in `yield'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:292:in `source_from_path'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:301:in `block in aggregate_with_repos'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:301:in `map'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:301:in `aggregate_with_repos'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:24:in `aggregate'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-core-1.0.0/lib/cocoapods-core/source/manager.rb:61:in `all'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.0/lib/cocoapods/user_interface/error_report.rb:163:in `repo_information'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.0/lib/cocoapods/user_interface/error_report.rb:76:in `stack'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.0/lib/cocoapods/command/env.rb:38:in `stack'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.0/lib/cocoapods/command/env.rb:26:in `report'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.0/lib/cocoapods/command/env.rb:20:in `run'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.0/lib/cocoapods/command.rb:50:in `run'
/Users/tburns/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.0/bin/pod:55:in `<top (required)>'
/Users/tburns/.rbenv/versions/2.2.2/bin/pod:23:in `load'
/Users/tburns/.rbenv/versions/2.2.2/bin/pod:23:in `<main>'

Hmm... uninstalling psych 2.0.17 restored functionality; 2.0.8 appears to be the default version of the gem and pod behaves itself again when that's the only version available. I'm back up and running for now, but let me know if I can be of any further assistance in debugging this!

😭😭😭

Got the same error and fixed it by running

$ sudo gem cleanup

It removes old versions of cocoapods (I had three installed), and works for me with two versions of psych installed.

$ gem list
cocoapods (1.0.1)
psych (2.0.17, 2.0.8)

Closing this, because I don't think there unfortunately isn't anything actionable we can do here.

I have the same issue and neither fixes worked for me. Can someone help point me in the right direction? @neonichu

@ajspencer can you please file a new issue with repro steps? We'd be happy to help :)

@benasher44 thank you! I fixed it by completely uninstalling Psych and then running the setup command. I recommend that method for anyone else that has this problem.

gem uninstall psych 
pod setup --verbose
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sonu5 picture sonu5  Â·  3Comments

intelliot picture intelliot  Â·  3Comments

pronebird picture pronebird  Â·  3Comments

steffendsommer picture steffendsommer  Â·  3Comments

k06a picture k06a  Â·  3Comments