bundle install timing out
This weekend randomly I found bundle install
to be timing out
Retrying download gem from https://rubygems.org/ due to error (2/4): Gem::RemoteFetcher::UnknownHostError timed out (https://rubygems.org/gems/shellany-0.0.1.gem)
My friend Meg Gutshall informed me that RubyGems is deprecating their Dependency API this week, so at first I thought that was the problem.
In the end, though, a couple of StackOverflow posts pointed me to some issues with Bundler and Gem resolving or connecting to advertised IPv6 addresses
- StackOverflow: Timeout when installing ruby gems
- StackOverflow: Ruby gem install comes up with timeout error every time
On MacOS first list your network devices:
networksetup -listallnetworkservices
which showed me
An asterisk (*) denotes that a network service is disabled.
USB3.0 5K Graphic Docking
Wi-Fi
Thunderbolt Bridge
Then I disabled IPv6 on your primary device:
networksetup -setv6off USB3.0\ 5K\ Graphic\ Docking
And now bundle install
is lightning fast again.