Recently I have needed to install pod file. I have tried by
$ sudo gem install cocoapods
but after several seconds after entering password, I got bellow error:
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from http://rubygems.org/ - Errno::EHOSTUNREACH: No route to host - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
I searched this error, I found some questions similar, such as Stack question but none of solution resolved my problem. If there is any other way to try, please let me know.