简体   繁体   English

Pod init 或 Pod update 出现以下错误

[英]Pod init or pod update is giving the below error

I am unable to use pod install or update.我无法使用 pod install 或 update。 I have installed the cocoapods again and updated gems as well.我再次安装了 cocoapods 并更新了 gems。 Is there any way this can be resolved.有什么办法可以解决这个问题。 I have spent a day on this but no luck.我花了一天的时间,但没有运气。 This the error:这是错误:

  Update all pods

   Updating local specs repositories
   /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods- 
   core/source/metadata.rb:15:in `initialize': undefined method `with_indifferent_access' for #<String:0x00007fa4df813c48> (NoMethodError)
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/metadata.rb:28:in `new'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/metadata.rb:28:in `from_file'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source.rb:434:in `refresh_metadata'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:55:in `refresh_metadata'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source.rb:31:in `initialize'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/cdn_source.rb:29:in `initialize'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:308:in `new'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:308:in `block in source_from_path'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:315:in `source_from_path'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:324:in `block in aggregate_with_repos'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:324:in `map'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:324:in `aggregate_with_repos'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:24:in `aggregate'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/source/manager.rb:58:in `all'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface/error_report.rb:173:in `repo_information'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface/error_report.rb:77:in `stack'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface/error_report.rb:24:in `report'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.3.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `<main>'

just to be correct, you've already uninstalled and reinstalled the Cocoapods ?只是为了正确, 您已经卸载并重新安装了 Cocoapods吗? Because that solution always works for me.因为那个解决方案总是对我有用。

Is this with Xcode or a different IDE?这是使用 Xcode 还是其他 IDE?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM