I'm getting the following error when trying to deploy to fly.io
I get this error both on updating an existing rails app and when trying to deploy a new one.
=> ERROR [base 5/5] RUN gem update --system --no-document && gem install -N bundler -v 2.2.33 60.9s
------
> [base 5/5] RUN gem update --system --no-document && gem install -N bundler -v 2.2.33:
#10 60.85 ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
#10 60.85 Net::OpenTimeout: execution expired (https://rubygems.org/specs.4.8.gz)
------
Error failed to fetch an image or build from source: error building: executor failed running [/bin/bash -o pipefail -c gem update --system --no-document && gem install -N bundler -v ${BUNDLER_VERSION}]: exit code: 1
Apparently this is an issue relating to bundler trying to connect to rubygems via IPv6 and not resolving and then timing out before trying IPv4.
I've seen various workarounds for this on local machines, but I'm not sure how to solve this in fly.io / docker environment.
Ive posted on their forums too but without much response.
Any help is appreciated.
UPDATE: Upon further investigation, it seems that fly.io uses a remote app they host on your account to do the build before it gets deployed. It seems that the problem is that builder not being able to access rubygems.org.