Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.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 on rails 乘客(在Apache下,运行Rails应用程序)没有连接到Postgres,但给出了无用的错误消息_Ruby On Rails_Postgresql_Apache_Passenger - Fatal编程技术网

Ruby on rails 乘客(在Apache下,运行Rails应用程序)没有连接到Postgres,但给出了无用的错误消息

Ruby on rails 乘客(在Apache下,运行Rails应用程序)没有连接到Postgres,但给出了无用的错误消息,ruby-on-rails,postgresql,apache,passenger,Ruby On Rails,Postgresql,Apache,Passenger,我想在一台服务器上运行两个应用程序,分别是CentOS 7、Apache 2.4、Passenger 5.2.3、Rails 5.1.3和Ruby 2.3.1。一个应用程序使用PostgreSQL(9.6.5)(另一个使用MySQL)。启动时,一个应用程序显示以下错误: [ D 2018-04-30 18:18:09.6842 29585/Tq age/Cor/Spa/Spawner.h:713 ]: [App 29639 stdout] !> Error [ D 2018-04-30 1

我想在一台服务器上运行两个应用程序,分别是
CentOS 7
Apache 2.4
Passenger 5.2.3
Rails 5.1.3
Ruby 2.3.1
。一个应用程序使用
PostgreSQL(9.6.5)
(另一个使用
MySQL
)。启动时,一个应用程序显示以下错误:

[ D 2018-04-30 18:18:09.6842 29585/Tq age/Cor/Spa/Spawner.h:713 ]: [App 29639 stdout] !> Error
[ D 2018-04-30 18:18:09.6842 29585/Tq age/Cor/Spa/Spawner.h:713 ]: [App 29639 stdout] !> 
[ E 2018-04-30 18:18:09.7171 29585/Tq age/Cor/App/Implementation.cpp:305 ]: Could not spawn process for application /var/www/html/my_carrier_packets: An error occurred while starting up the preloader.
  Error ID: c1c03884
  Error details saved to: /tmp/passenger-error-ffVmuJ.html
  Message from application: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
 (PG::ConnectionBad)
  /var/www/html/my_carrier_packets/vendor/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg.rb:56:in `initialize'
...
错误详细信息”文件在功能上是对上述内容的重述,数据稍多一些,
.s.PGSQL.5432
,在搜索列出的错误ID时找不到任何内容


我错过了什么?需要做什么?

答案是(最终)。其中引用了

因此,概括一下:如果您在Apache(可能还有其他web服务器)下运行Rails,那么您的数据库配置可能是连接错误的根源