Emily Grace Acres
Emily Grace Acres

Reputation: 185

Heroku doesn't recognize DATABASE_URL

I've deployed my site to heroku and now I'm trying to push my local database up but keep getting this error:

▸ Unknown database:

my_database_url

▸ Valid options are: DATABASE_URL

After using the command:

heroku pg:push postgres://user@localhost:5432/app_name
heroku_database_url --app heroku_app_name

But the DATABASE_URL I'm using is the one that I've gotten from heroku with

heroku config:get DATABASE_URL

and using the returned value. I tried reseting the DATABASE_URL but I still get the same error. Any help would be appreciated, thanks!

Upvotes: 6

Views: 1543

Answers (1)

Emily Grace Acres
Emily Grace Acres

Reputation: 185

Solved: Needed to use the literal word "DATABASE_URL" instead of the string returned from Heroku when asked for the DATABASE_URL

Upvotes: 6

Related Questions