I can't migrate PostgreSQL by flyctl ssh console -C "/rails/bin/rails db:migrate"

@minorex16 That’s very odd, can you post the output of fly deploy? If that fails, the documentation has information on commonly found problems.

If fly deploy is working as expected: do you see the same behavior if you try to launch a new app with fly launch?

fly deploy . --app tacticanote-postgres --image flyio/postgres-flex:15.6
==> Verifying app config
Validating /Users/minorisugimura/TacticaChat/fly.toml
✓ Configuration is valid
--> Verified app config
==> Building image
Searching for image 'flyio/postgres-flex:15.6' remotely...
image found: img_dozgpe8dx301p096

Watch your deployment at https://fly.io/apps/tacticanote-postgres/monitoring


It looks working as expected.
-------
Updating existing machines in 'tacticanote-postgres' with rolling strategy

-------
 ✔ Machine 1857559c441d18 [app] update succeeded

@minorex16 Thanks for providing the logs.

I think the problem is you’re deploying a VM with a Postgres image, so it makes sense that the bin/rails executable is not in your machines, it only has access to what comes with the PostgreSQL dockerfile.

Your fly.toml does not specify an application running in HTTP(S) (port 80/443) either, so my suggestion if possible would be to remove the existing fly.toml and then run fly launch again to generate a new TOML file with the proper Rails configuration. This document provides more guidance: Existing Rails Apps · Fly Docs. Hope this helps!