Gem install hangs indefinitely

If gem install is hanging, it’s most likely a network, proxy, or firewall issue on your end.

You can investigate by issuing your gem install command in verbose mode with -V. It’ll show you what URLs it’s communicating with to download the gem, and you can hopefully see what it’s doing and where it’s hanging:

> gem install -V middleman
HEAD https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
HEAD https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
...

You can also check status.rubygems.org where they’ll alert you in case the gem/spec servers do have problems (see screenshot below):

RubyGem.org status screenshot

Leave a Comment