无法连接到服务器:“ / var / run / postgresql / .s.PGSQL.5432”? [英] could not connect to server: "/var/run/postgresql/.s.PGSQL.5432"?

查看:468
本文介绍了无法连接到服务器:“ / var / run / postgresql / .s.PGSQL.5432”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ruby On Rails中有一个带有postgresql数据库的简单网页,但是当我运行服务器时出现此错误,我不知道该怎么做。
我使用postgresql是因为heroku需要将乘法应用在postgresql中。

I have a simple web page in Ruby On Rails with postgresql database, but when I run sever I have this error, I don't Know that I do. I use postgresql because heroku need that the aplication is in postgresql.

我在ubuntu 13.10中工作

I work in ubuntu 13.10

错误是:

PG :: ConnectionBad
无法连接到服务器:没有此类文件或目录服务器正在运行本地并接受Unix域套接字 /var/run/postgresql/.s.PGSQL.5432上的连接?

PG::ConnectionBad could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

我需要帮助

谢谢

推荐答案

只需创建一个像这样的软链接,就可以了对我来说

Just create a softlink like this,this works for me

$ sudo ln -s /tmp/.s.PGSQL.5432 /var/run/postgresql/.s.PGSQL.5432

用于更多信息

这篇关于无法连接到服务器:“ / var / run / postgresql / .s.PGSQL.5432”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆