If you're experiencing that your bundle install command fails with an error message like this, rubygems.org might have issues with their ipv6 connectivity:
$ bundle install
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <timed out (https://rubygems.org/specs.4.8.gz)>
If that's actually the case, then you can try to deprioritize the ipv6 connection to the rubygems server, as described here Show archive.org snapshot .
To do so, simply add "precedence 2a04:4e42::0/32 5
" to the bottom of your /etc/gai.conf
file, and retry bundle install
. Maybe the command will succeed now.
Warning
Don't forget to remove the line from the
/etc/gai.conf
file as soon as you don't need it anymore, so you don't have weird config laying around!