I have one office Mac running MacOS 10.13.2 and Ruby 2.2.1 and it is unable to install or run cocoapods via gems. sudo gem install cocoapods
returns the error below. I compared the proxy and DNS configuration and it is identical to other macs that can install successfully.
▶ ping https://rubygems.org
ping: cannot resolve https://rubygems.org: Unknown host
What is causing cocoapods installation to fail with the cryptic no such name ( https://rubygems.org/specs.4.8.gz ) error message?
I tried the answer from this question: 'sudo gem install cocoapods' doesn't work on ElCapitan 10.11.4 , ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository
$ sudo gem install cocoapods --source http://rubygems.org
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from https://rubygems.org/ - no such name ( https://rubygems.org/specs.4.8.gz ) Unable to download data from http://rubygems.org/ - no such name ( http://rubygems.org/specs.4.8.gz )
通过连接到移动热点并通过它更新红宝石,解决了该问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.