【问题标题】:Failed to pull db from Heroku无法从 Heroku 中提取数据库
【发布时间】:2012-07-06 07:58:29
【问题描述】:

尝试将数据库从 Hekoku 拉到本地但失败。

heroku db:pull postgres://root:@localhost/db_name 

诚然,我不知道应该如何构造 url。在官方site 中是heroku db:push postgres://postgres:mypass@remotehost/mydb,在this 文章中使用了heroku db:pull postgres://root:@localhost/db_name。用户名和密码是干什么用的?

无论如何,我得到的错误信息是:

 Sequel::DatabaseConnectionError -> TypeError: wrong argument type Sequel::Postgres::Adapter (expected Struct)

按照说明更新taps, sequel, and pg,这是我的宝石列表:

rest-client (1.6.7)
sinatra (1.0)
taps(0.3.24)
sequel (3.37.0, 3.20.0)
pg (0.14.0)

【问题讨论】:

  • 你能发布完整的回溯吗?没有它就很难诊断问题的原因。
  • 您的应用程序是在使用 Activerecord,还是只是手动提取?

标签: database heroku


【解决方案1】:

这个问题现在不再相关,因为我已经按照here 的建议从共享 sqlite 数据库切换到 9.1 开发 pg 数据库。因此,我将使用更复杂的pgbackup,而不是使用简单的 db pull/push,这实际上是 Heroku 推荐的。

【讨论】:

    猜你喜欢
    • 2014-10-21
    • 1970-01-01
    • 2021-03-04
    • 2016-05-07
    • 1970-01-01
    • 2019-11-22
    • 2014-04-19
    • 2020-09-29
    • 2011-05-29
    相关资源
    最近更新 更多