Hello Developer's我是ios的新手,我以前在我的MAC中安装了cocoapods。现在我重设了MacBook Air。然后我试图将吊舱安装到我的项目中,错误显示为“ ERROR: Could not find a valid gem 'rubygems-update' (>= 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 ("
所以首先我检查了Mac上当前安装的Pod版本
这是我的豆荚环境
$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.14.1
- RUBY VERSION: 2.0.0 (2015-12-16 patchlevel 648) [universal.x86_64-darwin16]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-16
- GEM PATHS:
- /Library/Ruby/Gems/2.0.0
- /Users/dtimac13/.gem/ruby/2.0.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
当我尝试将Pod安装到我的项目时,错误消息显示为
1:$ cd /Users/dtimac13/Desktop/RaviTejaEX
2:$ pico podfile
3:$ pod install
-bash: pod: command not found
帮帮我。谢谢您
答案 0 :(得分:0)
问题是ruby版本附带的SSL版本已过期,您需要更新ruby版本:
因此,从2018年1月开始,RubyGems.org至少需要TLSv1.2。这意味着RubyGems.org和gem命令将不再支持不支持TLS 1.2的Ruby和OpenSSL版本。 / p>
您可以按照本指南进行操作,但是我建议升级到最新版本的ruby:https://bundler.io/v1.16/guides/rubygems_tls_ssl_troubleshooting_guide.html#the-solutions