The ruby version needs to match the one specified in the following locations: “Gemfile.lock”, “Gemfile”, “.ruby_version”. See: flyctl/rails.go at ae87986faaed792d1ea6153529306a0b2972bc52 · superfly/flyctl · GitHub
This was a recent regression introduced in flyctl: Update base Rails image to point to Debian 11 (from Debian 10) · superfly/flyctl@c3b42b6 · GitHub . See the pull request for more background information: Update base Rails image to point to Debian 11 (from Debian 10) by bradgessler · Pull Request #1462 · superfly/flyctl · GitHub . I was the one to merge the pull request, but likely will be reverting it while looking for a better solution.
It looks like the latest debian image for each ruby version is as follows:
{"2.6.3"=>"2.6.3-jemalloc-stretch-slim",
"2.6.4"=>"2.6.4-jemalloc-stretch-slim",
"2.6.5"=>"2.6.5-jemalloc-buster-slim",
"2.6.6"=>"2.6.6-jemalloc-buster-slim",
"2.6.7"=>"2.6.7-jemalloc-buster-slim",
"2.6.8"=>"2.6.8-jemalloc-bullseye-slim",
"2.6.9"=>"2.6.9-jemalloc-bullseye-slim",
"2.7.0"=>"2.7.0-jemalloc-buster-slim",
"2.7.1"=>"2.7.1-jemalloc-buster-slim",
"2.7.2"=>"2.7.2-jemalloc-buster-slim",
"2.7.3"=>"2.7.3-jemalloc-buster-slim",
"2.7.4"=>"2.7.4-jemalloc-bullseye-slim",
"2.7.5"=>"2.7.5-jemalloc-bullseye-slim",
"2.7.6"=>"2.7.6-jemalloc-bullseye-slim",
"3.0.0"=>"3.0.0-jemalloc-buster-slim",
"3.0.1"=>"3.0.1-jemalloc-buster-slim",
"3.0.2"=>"3.0.2-jemalloc-bullseye-slim",
"3.0.3"=>"3.0.3-jemalloc-bullseye-slim",
"3.0.4"=>"3.0.4-jemalloc-bullseye-slim",
"3.1.0"=>"3.1.0-jemalloc-bullseye-slim",
"3.1.1"=>"3.1.1-jemalloc-bullseye-slim",
"3.1.2"=>"3.1.2-jemalloc-bullseye-slim"}
I produced the above list with the following code:
require 'net/https'
require 'json'
tags = []
debian_releases = %w(stretch buster bullseye bookworm)
Net::HTTP.start('quay.io', 443, use_ssl: true) do |http|
(1..).each do |page|
request = Net::HTTP::Get.new "/api/v1/repository/evl.ms/fullstaq-ruby/tag/?page=#{page}&limit=100"
response = http.request request
body = JSON.parse(response.body)
tags += body['tags'].map {|tag| tag['name']}.grep /jemalloc-\w+-slim/
break unless body['has_additional']
end
end
ruby_releases = tags.group_by {|tag| tag.split('-').first}.
map do |release, tags|
[release, tags.max_by {|tag| debian_releases.find_index(tag[/jemalloc-(\w+)-slim/, 1]) || -1}]
end.sort.to_h