24 Replies
3 years ago
going to need more information, are you trying to connect to a database hosted on railway?
Yes postgres hosted on railway in the same project. I have added DATABASE_URL as the env variable but its still throwing this error. I have multiple such projects running and everything works fine. Only in this project i am facing this issue.
3 years ago
show me the code that connects to the database please
3 years ago
show me where that database url variable is defined please
3 years ago
but that's just the word "postgres" I'm not sure what you are doing there
3 years ago
that's an empty string?
3 years ago
it should load the value from the environment variables
3 years ago
have you done the classic debugging technique of printing the variable that you use in tortoise?
3 years ago
at first glace this is kinda looking like its loading variables from a file?
I tried logging the db url that the app is connecting to and the url looks fine.
3 years ago
its printing the scheme blank in your screenshot

3 years ago
right but seems like tortoise is ending up with a bad url
3 years ago
print the same value you are passing to tortoise, not just the environment variable




