Error on installing Pod
<p>Recently I have needed to install pod file. I have tried by </p>

<pre><code>$ sudo gem install cocoapods
</code></pre>

<p>but after several seconds after entering password, I got bellow error:</p>

<blockquote>
  <p>ERROR:  Could not find a valid gem 'cocoapods' (>= 0), here is why:</p>
  
  <p>Unable to download data from <a href="http://rubygems.org/" rel="nofollow noreferrer">http://rubygems.org/</a> - Errno::EHOSTUNREACH: No route to host - connect(2) (<a href="http://rubygems.org/latest_specs.4.8.gz" rel="nofollow noreferrer">http://rubygems.org/latest_specs.4.8.gz</a>)</p>
</blockquote>

<p>I searched this error, I found some questions similar, such as <a href="https://stackoverflow.com/questions/15305350/gem-install-fails-with-openssl-failure">Stack question</a> but none of solution resolved my problem. If there is any other way to try, please let me know.</p>