我正在尝试安装cocoa-pods在终端中出现此错误。我已经搜索了很多并尝试了许多解决方案,这些解决方案在stackoverflow上可用,但对我来说没什么用。请帮助我如何解决这个问题..
$ sudo gem install cocoapods
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - connect(2) (https://api.rubygems.org/specs.4.8.gz)
ED: Connection refused - connect(2) (https://api.rubygems.org/specs.4.8.gz)