我遇到了同样的问题。
最后,我将以下内容作为一种变通方法插入:
if Rails.env.development?
username = "discourse"
password = "discourse"
config["host"] = "localhost"
config["port"] = 5432
config["database"] = "discourse_development"
end
在
DatabaseConfiguration.new(
之前,插入到 /lib/backup_restore.rb 中。
我还必须通过以下方式为用户 discourse 设置密码:
d/psql -c "ALTER USER discourse WITH PASSWORD 'discourse';"
也许有更好的方法可以实现这一点。