当我尝试安装cocoapods时,出现以下错误消息:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect
returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert
protocol version (https://rubygems.org/latest_specs.4.8.gz)
我以为我已经下载了cocoapods,但是当我使用来检查版本时
pods --version
我明白了:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'cocoapods' (>= 0) among 30 total gem(s) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in
to_spec'
来自/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in gem'
from /usr/local/bin/pod:22:in
'
关于如何解决它的任何想法?在此先感谢您,并感谢您格式化。
答案 0 :(得分:1)
想通了!只需更新Ruby即可。归功于此帖子:How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?