【发布时间】:2012-09-24 13:26:13
【问题描述】:
我刚刚重命名了我的应用程序(将旧名称的所有实例替换为新名称),现在我的应用程序无法再连接到在 localhost 上运行的 postgres 数据库。
PG::Error (could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
有什么想法吗?
谢谢:-----)
编辑:这是我的 database.yml
common: &common
adapter: postgresql
username: <username>
password: <password>
development:
<<: *common
database: development
test:
<<: *common
database: test
production:
<<: *common
database: production
其中 username 和 password 是我的 postgres 安装的用户名和凭据。但是,我也无法使用 pgAdmin 连接到服务器!
【问题讨论】:
-
您能否发布您的 database.yml 文件,您是否尝试将其重命名为旧名称并检查它是否有效。
标签: ruby-on-rails-3 postgresql-9.1