How do I connect my rails app to an external postgres database

I’m not an English speaker, so I apologize if there are any mistakes or another problems in my English.
I would like to connect my render app (in rails written) to an external postgres database.
I edit the environment variable of DATABASE_URL with syntax of “postgres://USER:PASSWORD@HOST:PORT/DATABASE”, but I have failed to deploy it. I have confirmed the line is valid.

I guess that my render.yaml code is wrong. My render.yaml is just as it’s written in quickstarts. What do I change in it?

Hi there,

There would be no difference in doing it on us as you would do with another provider. You would do exactly as you describe there.

I’d suggest looking at the deploy output for your latest deploy as that would suggest another issue which is likely the cause of the failure.

If you want to talk specifics I would encourage you to open a support ticket from our dashboard as opposed to on a public forum,

Regards,

John B

I looked at the log, I understood that other codes is wrong, as you said.
Now I succeed to deploy my project. Thanks!

Great, thanks for the update! I’m glad you got things figured out.

John B

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