title: Problems with installing Ruby Gems?
body: <p>I have Ruby installed on my Mac, but when I try <code>gem install rails</code> I get the following error message: </p>
  
  <pre><code>Could not find a valid gem 'rails' (&gt;= 0), here is why:
  Unable to download data from https://rubygems.org/ - Errno::ENOMEM: Cannot allocate memory - connect(2) (https://rubygems.org/latest_specs.4.8.gz)
  </code></pre>
  
  <p>I've tried several other gems and get the same message. I'm not sure what this means, can anyone suggest anything?   </p>
  
  <p>Output of <code>gem env</code>: </p>
  
  <blockquote>
    <p>RubyGems Environment:</p>
    
    <ul>
    <li>RUBYGEMS VERSION: 2.0.3</li>
    <li>RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [universal.x86_64-darwin13]</li>
    <li>INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0</li>
    <li>RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby</li>
    <li>EXECUTABLE DIRECTORY: /usr/bin</li>
    <li>RUBYGEMS PLATFORMS:
    <ul>
    <li>ruby</li>
    <li>universal-darwin-13</li>
    </ul></li>
    <li>GEM PATHS:
    <ul>
    <li>/Library/Ruby/Gems/2.0.0</li>
    <li>/Users/brent/.gem/ruby/2.0.0</li>
    <li>/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/
    2.0.0</li>
    </ul></li>
    <li>GEM CONFIGURATION:
    <ul>
    <li>:update_sources => true</li>
    <li>:verbose => true</li>
    <li>:backtrace => false</li>
    <li>:bulk_threshold => 1000</li>
    </ul></li>
    <li>REMOTE SOURCES:
    <ul>
    <li><a href="https://rubygems.org/" rel="nofollow">https://rubygems.org/</a></li>
    </ul></li>
    </ul>
  </blockquote>