Cannot attach pg db to my app.

I am getting this error when trying to attach my pg db to my Rails app:
image

Any advice?

Looks like you are trying to connect your app… to your app? Doesn’t the db have a different name?

Sorry I may have misunderstood the command… sooo was I supposed to do this: ??
image

You can unset the DATABASE_URL secret by running fly secrets unset DATABASE_URL and reattach a db

Setting and unsetting a secret however causes a new deploy, so if you want to avoid that, you can scale your app down to zero fly scale count 0 and run the unset and reattach command

Thank you @shortdiv for your advice. At the end, I just destroyed both the app and the app-db and recreated everything from scratch and now everything seems to be working, I really don´t know what I did wrong, but know it works!!!

1 Like