Cannot create or migreate postgres db with Rails App

I’m trying to deploy a rails app to fly.io. The app appears to deploy correctly with a connected postgres database but I can’t run the db:create or db:migrate commands.

I tried to use fly ssh console to get a console and run bin/rails db:migrate there but I keep getting the error /usr/bin/env: ‘ruby’: No such file or directory. What is the correct way to create and migrate the postgres database?

I’m no Ruby developer, but the following link will show you how to run migrations during deployment:

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