我正在尝试更新运行命令的项目窗格:
pod update
但我总是得到同样的错误:
Psych::SyntaxError - (/Users/vojta/.cocoapods/repos/master/CocoaPods-version.yml): mapping values are not allowed in this context at line 3 column 4
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:153:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:129:in `load'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `block in load_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `load_file'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods/sources_manager.rb:262:in `version_information'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods/sources_manager.rb:223:in `repo_compatible?'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods/sources_manager.rb:282:in `master_repo_functional?'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods/command.rb:39:in `parse'
/Library/Ruby/Gems/2.0.0/gems/claide-0.5.0/lib/claide/command.rb:243:in `parse'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods/command.rb:38:in `parse'
/Library/Ruby/Gems/2.0.0/gems/claide-0.5.0/lib/claide/command.rb:275:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods/command.rb:54:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/bin/pod:33:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
```
答案 0 :(得分:1)
我发现很容易修复。
跑吧:
sudo rm -fr ~/.cocoapods/repos/master
pod setup
希望它会帮助别人。