【问题标题】:Rails 3: PostgreSQL access denied after renaming appRails 3:重命名应用程序后拒绝 PostgreSQL 访问
【发布时间】: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


【解决方案1】:

我找到了答案:显然我的 postgres 服务器没有在本地运行,所以我不得不手动启动服务。 :-)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-12
    • 1970-01-01
    • 1970-01-01
    • 2023-03-14
    • 2013-02-06
    • 1970-01-01
    相关资源
    最近更新 更多