9

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

Community
  • 1
  • 1
Omnipresent
  • 29,434
  • 47
  • 142
  • 186

5 Answers5

16

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

Jeff Dickey
  • 5,036
  • 4
  • 28
  • 39
4

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

Robert B
  • 2,863
  • 4
  • 31
  • 40
1

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

Alex
  • 4,367
  • 5
  • 29
  • 45
0

Try:

heroku info

If you get anything other than something like this (assuming the app name is 'blah-blah-app-name-9897'):

=== blah-blah-app-name-9897
Addons:        PG Backups Basic, Shared Database 5MB
Database Size: 184k
Domain Name:   blah-blah-app-name-9897.herokuapp.com
Git URL:       git@heroku.com:blah-blah-app-name-9897.git
Owner:         owner_email@jmail.com
Repo Size:     9M
Slug Size:     30M
Stack:         cedar
Web URL:       http://blah-blah-app-name-9897.herokuapp.com/

Then something is wrong with your heroku setup.

Post the output of your heroku info here to see details.

Alex
  • 41
  • 1
0

If you are in the /db directory rather than at the root of your Rails app, you can get this error.

Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
Scott O
  • 11
  • 1
  • 2