Heroku Db:Pull Does Not Work

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.



Related Topics



Leave a reply



Submit