Trouble access rails console

I’m having trouble accessing the rails console on my fly app.

flyctl ssh console
bash
cd /app/
./bin/rails console

I run these commands but my console just freezes and hangs

Are you running on the smallest vm with 256MB of RAM? Rails occasionally crashed a whole VM with an out-of-memory error when you run a console with too little RAM.

You can check this by running:

fly status --all

Look for VMs with restart counts > 0 or in a failed state.

Then run:

fly vm status <id>

You should see why the VM crashed in there.

The solution was to increase the ram size from 256mb to 512mb