Read more

Temporary solution for connection errors with rubygems

Jakob Scholz
October 18, 2022Software engineer at makandra GmbH

The problem

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)>

The (a little bit dirty) possible solution

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

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!

Posted by Jakob Scholz to makandra dev (2022-10-18 09:47)