【发布时间】:2013-07-16 23:45:49
【问题描述】:
我在 database.yml 中有以下内容
production:
adapter: postgresql
database: dbname
host: host.compute-1.amazonaws.com
username: user
password: pass_word
DATABASE_URL: postgres://user:pass_word@host.compute-1.amazonaws.com:5432/dbname
但是在 git push heroku master 上,我收到以下错误。
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
我是否也需要针对其他环境进行更改?
【问题讨论】:
-
请从 database.yml 中删除 DATABASE_URL
-
我是在之前得到错误后才添加的,但错误没有任何变化
-
您在 git push 时遇到了错误,所以请您粘贴您在 git push heroku master 时遇到的全部错误
-
请同时检查stackoverflow.com/questions/16124490/…和
config.assets.initialize_on_precompile = false
标签: ruby-on-rails heroku configuration