Skip to content

Conversation

g-paras
Copy link
Owner

@g-paras g-paras commented Aug 29, 2021

Postgres DATABASE_URL should start with postgresql:// but in Heroku database it starts with postres:// which can cause an Application error.

Fix
Instead to directly passing the environment variable, first load the variable and then replace postgres:// with postgresql:// using str.replace method.

@g-paras g-paras temporarily deployed to sentiment-analysis-web-app August 29, 2021 14:35 Inactive
replace method does not update the string instead, it creates a new string. We need assing that new string to database_url
@g-paras g-paras temporarily deployed to sentiment-analysis-web-app August 29, 2021 14:50 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant