Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 启动sinatra应用程序时出现故障_Ruby_Postgresql_Sinatra - Fatal编程技术网

Ruby 启动sinatra应用程序时出现故障

Ruby 启动sinatra应用程序时出现故障,ruby,postgresql,sinatra,Ruby,Postgresql,Sinatra,我已经克隆了一个sinatra应用程序,正在尝试运行该应用程序。我已按照回购协议中的步骤阅读我,但当我运行时: 货架-第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 connection

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

货架-第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 server,如果它已经在运行,请检查您的防火墙配置。(或者,如果您的PostgreSQL server运行在
127.0.0.1:4000
位置,您需要将应用程序配置调整为这些值)

您的PostgreSQL未运行或不接受
127.0.0.1:5432处的连接


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

您可以手动连接到Postgres吗?是否安装了PostgreSQL?您是否已为此应用程序设置了数据库?如果运行macOS,则可以使用
brew安装postgresql
安装Postgres。有关实际设置数据库的信息,您必须参考克隆的应用程序的文档。是否可以手动连接到Postgres?是否安装了PostgreSQL?您是否已为此应用程序设置了数据库?如果运行macOS,则可以使用
brew安装postgresql
安装Postgres。您必须参考您克隆的应用程序的文档,以了解有关实际设置数据库的信息。谢谢,防火墙造成了部分问题并阻止了我的连接。我还意识到PostgreSQL 11版与windows 10不兼容,因此我将其降级为10版。谢谢,防火墙造成了部分问题并阻止了我的连接。我还意识到PostgreSQL 11版与windows 10不兼容,所以我降级到了10版。