Ruby version woes when deploying a rails app

I have a pretty straightforward Rails 2.6.3 app that I’m trying to deploy for the first time. Out of the box we had a version mismatch, so I just went to fly.toml and changed RUBY_VERSION to 2.6.3.

Now here’s what happens when I run fly deploy:

==> Verifying app config
--> Verified app config
==> Building image
Remote builder fly-builder-aged-mountain-4128 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon  158.6kB
[+] Building 0.7s (5/5) FINISHED                                                                                                                                                                      
 => CACHED [internal] load remote build context                                                                                                                                                  0.0s
 => CACHED copy /context /                                                                                                                                                                       0.0s
 => resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                            0.4s
 => CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78496ff5                                                       0.0s
 => ERROR [internal] load metadata for quay.io/evl.ms/fullstaq-ruby:2.6.3-jemalloc-slim                                                                                                          0.2s
------
 > [internal] load metadata for quay.io/evl.ms/fullstaq-ruby:2.6.3-jemalloc-slim:
------
Error failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = quay.io/evl.ms/fullstaq-ruby:2.6.3-jemalloc-slim: not found

What’s going on here?

I note that the Fullstaq Ruby images only start from 2.7 now – Quay – so that may be the problem. I think this is also true of the official Ruby images too though.

Your route forward is probably to upgrade to using Ruby 2.7. The 2.6 to 2.7 upgrade isn’t terribly onerous but can throw up a lot of deprecation warnings. There’s a presentation about it at Upgrading GitHub from Ruby 2.6 to 2.7 - Speaker Deck … luckily 2.7 to 3.x is an easier upgrade (unless you’re using a particularly old version of Rails) so it’ll really kick you forward a few steps.

Another possibility (but not my recommended one) is to write your own Dockerfile that installs Ruby 2.6.4 but it’s an EOL release so security wise it’s not the best idea.

Thanks! After a bit of dependency juggling this worked for me.