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

后端 未结 8 788
执笔经年
执笔经年 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:52

    That means your Postgres server is not running.

    Check Postgres Service status from Terminal

    sudo service postgresql status
    

    Enable Postgres Service, If not started

    sudo service postgresql start
    

    OR

    sudo service postgresql restart
    

    Now your command should work, If Postgres Service is successfully started.

提交回复
热议问题