无法启动 sinatra 应用程序

Trouble starting sinatra application

我已经克隆了一个 sinatra 应用程序并正在尝试 运行 该应用程序。我已经按照回购协议中的步骤阅读我但是当我 运行:

rackup -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?

感谢任何帮助,谢谢

您的 PostgreSQL 不是 运行 或不接受 127.0.0.1:5432

的连接

这意味着您应该启动一个 PostgreSQL 服务器,如果它已经 运行 检查您的防火墙配置。 (或者如果您的 PostgreSQL 服务器是 运行 at 127.0.0.1:4000,例如,您需要将您的应用程序配置调整为这些值)