为什么Postgresql 9.1不能与Rails 3.0一起使用? [英] Why is postgresql 9.1 not working with rails 3.0?

查看:159
本文介绍了为什么Postgresql 9.1不能与Rails 3.0一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到ubuntu 11.10,每当我运行Rails服务器时,我都会不断收到此错误:

I recently upgraded to ubuntu 11.10 and whenever I run my rails server I keep getting this error:

  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"?

在升级之前,数据库在Rails 3.0上运行良好.我该如何解决?

Prior to the upgrade the database was working fine with rails 3.0. How can I fix this?

推荐答案

修复了该问题.问题在于,PostgreSQL正在监听5433而不是5432.只是更改了database.yml文件中的端口.

Fixed it. The problem was that postgresql was listening on 5433 instead of 5432. Just changed the port in the database.yml file.

这篇关于为什么Postgresql 9.1不能与Rails 3.0一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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