简体   繁体   中英

heroku db:pull Failed to connect to database NoMethodError

When I run heroku db:pull I get a NoMethodError . Fervent googling has failed to provide a solution.

rails_app[master*]/
↪ heroku db:pull --remote [app] --confirm [app]
Loaded Taps v0.3.24
Auto-detected local database: postgres://127.0.0.1/[db name]?encoding=utf8
Warning: Data in the database 'postgres://127.0.0.1/[db name]?encoding=utf8' will be overwritten and will not be recoverable.
Failed to connect to database:
  NoMethodError -> undefined method `close' for nil:NilClass

The result is the same when I supply the database name as postgres://localhost/app_development

I have taps, pg, sequel installed:

rails_app[master*]/
↪ gem list --local | grep -E taps\|pg\|sequel
pg (0.15.1, 0.15.0, 0.14.1)
sequel (3.46.0, 3.20.0)
taps (0.3.24)

And just in case, my rails config/database.yml

development: &default
  adapter: postgresql
  database: app_development
  encoding: utf8
  min_messages: warning
  pool: 5
  timeout: 5000

test:
  <<: *default
  database: app_test

I'm on Rails 3.2.13.

Has anyone run into this and come up with a solution?

db:push and db:pull are currently deprecated; please use pgbackups to import and export data

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM