【问题标题】:Postgresql error connection to database failed when setting local environment for ruby on rails为 ruby​​ on rails 设置本地环境时,Postgresql 错误连接到数据库失败
【发布时间】:2020-02-04 03:49:53
【问题描述】:

当试图通过 heroku-cli 拉取 postgresql 数据库时出现以下错误:

pg_dump: error: connection to database "d34ferew43d" failed: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
pg_restore: error: could not read from input file: end of file
 ▸    pg_dump errored with 1

【问题讨论】:

    标签: ruby-on-rails postgresql heroku


    【解决方案1】:

    第一步是确保您可以直接从终端访问它。所以弹出打开heroku-cli并尝试直接连接。如果可以的话,这可能是您的 rails 配置的问题。如果不能,则需要检查服务器上的 heroku 配置。

    这可能会有所帮助: https://devcenter.heroku.com/articles/heroku-postgresql#using-the-cli

    【讨论】:

    • 感谢您的回复我使用命令heroku pg:info它显示错误缺少必填字段。
    猜你喜欢
    • 2012-06-10
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-28
    • 1970-01-01
    相关资源
    最近更新 更多