当我运行heroku db:pull
时,我得到NoMethodError
。热切的谷歌搜索无法提供解决方案。
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
当我提供数据库名称为postgres://localhost/app_development
我有点击,pg,续集安装:
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)
以防万一,我的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
我在Rails 3.2.13。
有没有人碰到这个并提出解决方案?
答案 0 :(得分:3)
db:push
和db:pull
目前已被弃用;请使用pgbackups导入和导出数据