Heroku Db:Pull Not Working

heroku db:pull does not work?

Use pgbackups instead of taps/db:pull

http://devcenter.heroku.com/articles/pgbackups

Cannot Pull Heroku Database to Local

You need to make sure that 1) PostgreSQL is installed and running locally and 2) the PostgreSQL command line tools are in your PATH. The error about createdb not being recognized indicates that the commands are not available.

why Heroku does not download database updates with 'Heroku db: pull'?

First, make sure you've got your gems all up to date by running bundle install. It won't hurt if everything's fine so you may as well make sure.

After that, you should be able to use db:pull to pull a copy to your local machine using the snippet that follows:

bundle exec heroku db:pull sqlite://local.db --app my_app

If this doesn't work for some reason, you can just change your Gemfile while pulling the database down -- and then you can change it back if you want to.

group :development, :test do
gem 'sqlite3'
# add this next line and run 'bundle install' until you get db:pull to work
gem 'pg'
end
group :production do
gem 'pg'
end

(I believe this will work, though I personally haven't tried it. Please respond if there's an issue.)

Finally, there are some issues pulling and pushing databases if you're running ruby 1.9.3 on your local machine -- but it's only if you're doing a db:push. If you have problems with that here's a link to the solution.

Heroku db pull error, it's looking for sqlite3 but I have postgres, how to change this?

The answer was that I actually didn't have sqlite3 installed (I am on a Mac and my app just uses postgres) and I had to install it (sqlite3).

[sudo] gem install sqlite3

I didn't need it in my Gemfile I just needed it installed on my machine.

Heroku db:pull Taps Load Error: no such file to load -- pg

The solution I found, using hints from https://github.com/ricardochimal/taps/issues/92 is detailed here: https://github.com/ricardochimal/taps/issues/92#issuecomment-6486535

The short of it, is that ruby 1.9.2-p320 seems to have been the problem, as far as I can tell. Downgrading to ruby 1.9.2-p290 fixed it for me. This might be related to the ruby 1.9.3 issues spoken about at the above link, not sure.

If you are still hanging in there with Taps, please see this comment at GH, as the poster doshea seems to have looked into it even more thoroughly than I or jfeust have.

I'll also reiterate here that if you don't need Taps, then heroku-pgtransfer is your friend. See Ryan's answer to my question here and his excellent blog post on using the newer tool.



Related Topics



Leave a reply



Submit