ruby - Pod MissingSpecError、Ruby、Gem、Cocoapods 等
问题描述
当我跑步时,pod
我现在得到
$ pod
Traceback (most recent call last):
3: from /usr/local/bin/pod:22:in `<main>'
2: from /usr/local/Cellar/ruby/2.6.0_1/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
1: from /usr/local/Cellar/ruby/2.6.0_1/lib/ruby/2.6.0/rubygems/dependency.rb:323:in `to_spec'
/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'cocoapods' (>= 0.a) among 7 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/User1/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/Cellar/ruby/2.6.0_1/lib/ruby/gems/2.6.0', execute `gem env` for more information
我试过重新安装 Cocoapods,删除所有宝石等。
某处有评论说这个问题是由于引用了错误的红宝石路径引起的,但哪个应该是“正确的”?一切工作了 4 年,但现在 Pod 无法运行,我不明白。
解决方案
1)brew reinstall cocoapods
(将出现有关链接的错误消息)
2)brew link --overwrite cocoapods
(修复链接)
我不知道为什么这是一个开始的问题,因为它也可以使用 pure 来工作gem
,但我现在很高兴
推荐阅读
- azure - 在租户迁移时验证 AAD 多租户应用程序的发布者域
- python - 如何将 Keras 中多个输入的标签赋予 model.fit() 函数?
- winapi - 我正在尝试在 python 中使用 pyttsx3 将文本转换为语音。但我可能在 driverName 上收到错误消息
- android - 如何使用 dagger2 为两个片段创建通用 ViewModel?
- java - 使用括号使用逻辑运算符有什么区别?
- cucumber - 使用黄瓜场景大纲和 webdriver io 时有没有办法关闭和重新打开浏览器
- python - 使用大型数据框绘图时,Plotly Express 箱形图会产生白屏
- php - 导入和设置 python 版本的问题
- kotlin - 为什么 DataInputStream 不能正确读取字符?
- html - 如何使用我网站上的一个页面来显示另一个页面内容?