error with postgresql datababse : Is the server running locally and accepting connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?

后端 未结 8 787
执笔经年
执笔经年 2021-02-05 17:09

When I run the rake db:migrate or run the rails s command, I get the same error:

Error : could not connect to server: 
No such file or         


        
8条回答
  •  深忆病人
    2021-02-05 17:41

    When I run into this error, my Postgres server was actually listening on a different port (5433) and not 5432. To solve this, add

    port: 5433
    

    to your database.yml file to instruct rails to use the same

提交回复
热议问题