i am using following command:
sudo gem install cocoapods
for this i am getting following response:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Failed to open TCP connection to api.rubygems.org:443 (Connection refused - connect(2) for "api.rubygems.org" port 443) (https://api.rubygems.org/specs.4.8.gz)
i tried uninstalling cocoapods and restart....everything.
upadte 1:
i try to debug
gem install bundler --debug -V
i got following output:
Exception `LoadError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/resolv.rb:171 - LoadError
Exception `Gem::UnsatisfiableDependencyError' at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/resolver/installer_set.rb:71 - Unable to resolve dependency: user requested 'bundler (>= 0)'
ERROR: Could not find a valid gem 'bundler' (>= 0) in any repository
Update 2:
i changed proxys in my mac.. now i am getting:
Could not find a valid gem 'cocoapods' (>= 0) in any repository
finally i found the answer:
just connected to ur personal Hotspot and use following command:
$ sudo gem install cocoapods --source http://rubygems.org
It appeared that it was my VPN that was not allowing the download, so the incoming readers should take care of that as well.
I tried to deactivate it after I read @Cristik answer by the way.
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.