【发布时间】:2019-05-10 22:07:39
【问题描述】:
我已经克隆了一个 sinatra 应用程序并正在尝试运行该应用程序。我已经按照 repo 中的步骤阅读了我,但是当我运行时:
机架 -p 4567
服务器启动,但出现以下错误:
PG::ConnectionBad at /
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
任何帮助都是appriciated,谢谢
【问题讨论】:
-
你可以手动连接到 Postgres 吗?
-
你安装了 PostgreSQL 吗?您是否为此应用程序设置了数据库?如果您运行 macOS,您可以使用
brew install postgresql安装 Postgres。您必须参考您克隆的应用程序的文档以获取有关实际设置数据库的信息。
标签: ruby postgresql sinatra