Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c bundle install && bundle exec bootsnap precompile --gemfile]

Hi! This is the first app I’m deploying to fly.io and I’m receiving the following error when deploying:

Error failed to fetch an image or build from source: error building: executor failed running [/bin/sh -c bundle install && bundle exec bootsnap precompile --gemfile]: exit code: 7

When I run fly doctor I receive the following:

image

The error message is worded confusingly but what it says is that you need to tell rubygems where to get gems from. You do that by adding the following as the first line in your Gemfile:

source "https://rubygems.org"

Once this is complete, run:

bundle install
fly deploy

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.