Over the past few months, the Dockerfile generated for Rails apps has changed considerably, so answering this properly won’t be possible without what your Dockerfile looks like. As an example, rails applications are now placed in /rails whereas they previously were placed in /app.
If you run the following command, what do you get?
So you have two apps, with two different working directories. For one you will need to do:
flyctl ssh console -C "app/bin/rails db:migrate"
If you like, you can update your Dockerfile to what fly will currently produce (and to closely match what Rails will be including in Rails 7.1) with the following commands:
bundle add dockerfile-rails --optimistic --group development
bin/rails generate dockerfile
Thank you @rubys, I tried those commands and re-deployed the second App. It seems like I don’t have the /app directory yet, and continue to have the error:
fork/exec app/bin/rails: no such file or directory
Also, this is what I get when running the ls in fly.io console:
bin boot dev etc home lib lib64 media mnt opt proc rails root run sbin srv sys tmp usr var