-3

I am trying to install CocoaPods, but I get this error:

Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2) (https://rubygems.org/latest_specs.4.8.gz)

Can you help me with that?

kjhughes
  • 106,133
  • 27
  • 181
  • 240
Step007
  • 9
  • 1

1 Answers1

3

When I was searching for solution to my problem mentioned below, I found this page. That seems more similar to your problem. Hope it works for you! Good luck!

I got a problem as follow:

➜  ~  gem install cocoapods
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: Operation timed out - connect(2) for "your-dns-needs-immediate-attention.network" port 443 (https://your-dns-needs-immediate-attention.network/quick/Marshal.4.8/cocoapods-0.33.1.gemspec.rz)`enter code here`

I'm new here(just know a little about objective-c, know nothing about ruby, gem or rvm). But I found a solution for me. I am not sure whether it works for you or not.

  1. go to the OSX network settings, under DNS you'll see the home.network line under the Search Domains area
  2. click "+" sign, add home.local

Or you may try with Starbucks' free wifi.

Reference: GitHub, StackOverflow

Community
  • 1
  • 1
Roden Luo
  • 366
  • 2
  • 11