我从远程存储库中提取了iOS项目。然后,我尝试安装cocoapods工具从其他开发人员引入的新pod,因此我运行pod install
,但是出现以下错误:
pod install
/Library/Ruby/Site/2.3.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'thread_safe' (~> 0.1) - did find: [thread_safe-0.3.6-java] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/Users/john/.rvm/gems/jruby-9.2.5.0:/Users/john/.rvm/gems/jruby-9.2.5.0@global', execute `gem env` for more information
from /Library/Ruby/Site/2.3.0/rubygems/specification.rb:1472:in `block in activate_dependencies'
from /Library/Ruby/Site/2.3.0/rubygems/specification.rb:1461:in `each'
from /Library/Ruby/Site/2.3.0/rubygems/specification.rb:1461:in `activate_dependencies'
为什么?该怎么解决?
==============更多信息======
当我通过命令ruby -v
检查我的红宝石版本时,我得到了jruby版本:
ruby -v
jruby 9.2.5.0 (2.5.0) 2018-12-06 6d5a228 Java HotSpot(TM) 64-Bit Server VM 12.0.2+10 on 12.0.2+10 +jit [darwin-x86_64]
为什么显示的是jruby版本而不是我使用的ruby版本?
答案 0 :(得分:0)
这与将Mac更新到10.15有关。这是由于Cocoapods位于2.3.0版中,而Catalina希望它位于2.6.0版中。
4个或5个解决方案为posted on their github。我个人没有办法让他们中的任何一个工作,但是基于情绪,这个人为大约80个人工作过:
简单安装cocoapods --build-from-source
brew链接-覆盖cocoapods