I’m trying to migrate from heroku to fly, and the last piece I’m missing is how to get a rails console. This could just be a lack of my cloud native knowledge or somehow related the buildpacks I’m using.
I try to get a console with:
flyctl ssh console -C '/app/bin/rails console'
But I get stuck with an error:
Your Ruby version is 2.7.0, but your Gemfile specified 3.1.1
I’ve also tried:
flyctl ssh console -C 'bash'
cd /app
bin/rails console
But still get the error:
Your Ruby version is 2.7.0, but your Gemfile specified 3.1.1
Here’s some of my toml:
kill_signal = "SIGINT"
kill_timeout = 5
[processes]
web = "bin/puma -C config/puma.rb"
worker = "bin/good_job"
[build]
builder = "heroku/buildpacks:20"
buildpacks = ["fagiani/apt@0.2.1", "heroku/ruby@0.1.3"]
[build.args]
DATABASE_URL="sqlite3:///tmp/db.sqlite3"
RAILS_MASTER_KEY=""
E_API_KEY=""
S3_BUCKET_NAME=""
S3_REGION=""
J_API_KEY=""
API_KEY=""
SENTRY_DSN=""
OK_API_KEY=""
STRIPE_ENV=""
HOSTNAME=""
[deploy]
release_command = "bin/rails db:migrate"
The rails web app and the worker process both run fine. The release command to migrate the db runs fine. I just don’t have a way in to inspect the app state.