2

I tried to push my database to heroku by doing heroku db:push which gave me the following error:

!    db:push and db:pull have been removed and replaced with pg:push and pg:pull.
!    For more information, please see:
!      devcenter.heroku.com/articles/heroku-postgresql#pg-push-and-pg-pull

So I tried heroku pg:push which gave me this error:

!    `pg:push` is not a heroku command.
!    Perhaps you meant `db:push` or `pg:ps`.

And heroku help pg gives

pg:credentials DATABASE  #  Display the DATABASE credentials.
pg:info [DATABASE]       #  Display database information
pg:promote DATABASE      #  Sets DATABASE as your DATABASE_URL
pg:psql [DATABASE]       #  Open a psql shell to the database
pg:reset DATABASE        #  Delete all data in DATABASE
pg:unfollow REPLICA      #  stop a replica from following and make it a read/write database
pg:wait [DATABASE]       #  monitor database creation, exit when complete

My app is on the cedar stack and here's the full command I'm using:

heroku pg:push my_local_name HEROKU_POSTGRESQL_CHARCOAL --app my_app_name

Also tried the suggestion of adding on pgbackups but I still get the same error.

DEfusion
  • 5,533
  • 5
  • 44
  • 60
  • have you looked at this answer? http://stackoverflow.com/questions/19490938/push-database-to-heroku-how-to-use-heroku-pgpush , seems to exist, but you may need more input to the commadn – blotto Feb 14 '14 at 18:46
  • Could you paste the full command you're trying to use? (I mean something like heroku `pg:push yourlocaldb HEROKU_POSTGRESQL_[COLOR_NAME] --app yourappname`) – lidkxx Feb 14 '14 at 21:31
  • just looked closer at your output from `heroku help pg`, try running `heroku addons:add pgbackups` ? – lidkxx Feb 14 '14 at 21:41
  • @miss-attitude I've added the command I'm trying and also tried adding on `pgbackups` but that makes no difference either. – DEfusion Feb 14 '14 at 23:08

2 Answers2

2

I figured it out, I was using the heroku gem (on ruby 1.9) when I went to see if there was a difference between the gem on 1.9 and 2.0 I saw the deprecation notice. This now works as expected with the heroku-toolbelt installed and the gems removed.

DEfusion
  • 5,533
  • 5
  • 44
  • 60
  • Link to the deprecation notice for this issue would be greatly appreciated! – zero_cool Sep 30 '14 at 14:02
  • I didn't even notice that the gem was still installed for myself. It definitely interferes (silently) with the toolbelt. – Mike D Nov 20 '14 at 18:50
0

in your project's dir, after installing taps gem, you can try using

taps server `heroku config:get DATABASE_URL` db db

to start a taps server, and then

taps push mysql://[usernme]:[password]@[host]/[database] http://db:db@localhost:500

to sync local db to heroku through taps

magnum
  • 1,090
  • 1
  • 8
  • 7