我花了两天时间才走到这一步。但我快到了。当我运行cap deploy:cold
部署失败并显示以下消息:
servers: ["xxx"]
[xxx] executing command
** [out :: xxx] rake aborted!
** [out :: xxx] FATAL: password authentication failed for user "my_app"
我的database.yaml
有这个:
production:
adapter: postgresql
encoding: utf8
database: my_app_production
pool: 5
host: localhost
username: my_app
password: secret
我在cap deploy
我创建的名为deployer
. 我在deployer
. 我还在my_app
psql 中创建了用户:
create user my_app with password 'secret';
create database my_app_production owner my_app;
我通过运行验证了用户my_app
存在\du
。当我通过 sshdeployer@xxx
并运行命令时psql
,我得到psql: FATAL: role "deployer" does not exist
.
我究竟做错了什么?