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 abl开发者_JAVA百科e 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
yes, make sure you are in the project root, I just ran into this problem as well
You need to have a database.yml file in your config directory so it knows what database to push from.
You can try to specify the db name, login and password using that format: heroku db:push postgres://username:password@localhost/myrailsdb
If you are in the /db
directory rather than at the root of your Rails app, you can get this error.
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.
精彩评论