When I run heroku db:pull
I get a NoMethodError
. Fervent googling has failed to provide a solution.
当我运行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
The result is the same when I supply the database name as postgres://localhost/app_development
当我提供数据库名称为postgres:// localhost / app_development时,结果是一样的
I have taps, pg, sequel installed:
我有水龙头,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)
And just in case, my rails config/database.yml
为了以防万一,我的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.
我在Rails 3.2.13上。
Has anyone run into this and come up with a solution?
有没有人碰到这个并想出一个解决方案?
1 个解决方案
#1
3
db:push
and db:pull
are currently deprecated; please use pgbackups to import and export data
db:push和db:pull目前已弃用;请使用pgbackups导入和导出数据
- Heroku DevCenter: Importing and Exporting Heroku Postgres Databases with PG Backups
Heroku DevCenter:使用PG备份导入和导出Heroku Postgres数据库
#1
3
db:push
and db:pull
are currently deprecated; please use pgbackups to import and export data
db:push和db:pull目前已弃用;请使用pgbackups导入和导出数据
- Heroku DevCenter: Importing and Exporting Heroku Postgres Databases with PG Backups
Heroku DevCenter:使用PG备份导入和导出Heroku Postgres数据库