Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku db:push showing invalid database url

I am trying to push data to a heroku app by using

heroku db:push

but it is spitting out this error:

root@ubuntu-lappy:~/rails/soft$ heroku db:push 
Invalid database url

any clue regarding this? my taps installation went fine because I was able to push the DB out before.

Is there something in particular I should be looking at?

EDIT: If you are looking for answer to this problem then you are better off providing the freaking URL yourself. Answered in this question

like image 416
Omnipresent Avatar asked Jan 27 '10 04:01

Omnipresent


People also ask

How do I access Postgres database heroku?

All Heroku Postgres databases have a corresponding Heroku application. You can find the application name on the database page at data.heroku.com. Your database is attached to the Heroku app and is accessible via an app config var containing the database URL, even if you host no code in the application itself.


3 Answers

yes, make sure you are in the project root, I just ran into this problem as well

like image 130
Jeff Dickey Avatar answered Oct 07 '22 09:10

Jeff Dickey


You need to have a database.yml file in your config directory so it knows what database to push from.

like image 36
Robert B Avatar answered Oct 07 '22 07:10

Robert B


You can try to specify the db name, login and password using that format: heroku db:push postgres://username:password@localhost/myrailsdb

like image 24
Alex Avatar answered Oct 07 '22 07:10

Alex