mba*_*jur 20 unix postgresql ansible
我知道这里有成千上万个像这样的任务,但我已经看到了所有这些,我仍然无法解决我的问题.
我正在使用ansible做所有事情,所以它非常自动化,但无论如何,这里是我的文件:
local all all trust
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
host all all 10.11.12.0/24 md5
Run Code Online (Sandbox Code Playgroud)
production:
database: my_db
adapter: postgresql
host: localhost
username: deploy
encoding: unicode
min_messages: WARNING
template: template0
Run Code Online (Sandbox Code Playgroud)
我deploy在我的系统中创建了一个用户(和没有设置密码的postgres用户).而现在,虽然我完全能够使用psql -d my_db(在服务器上)从bash登录postgres ,但我无法使用我的rails应用程序连接到数据库.运行rake db:migrateMigration给了我
PG::ConnectionBad: fe_sendauth: no password supplied
Run Code Online (Sandbox Code Playgroud)
我很害怕在开始使用这个问题而且我从前天的早晨开始与这个问题作斗争,它仍然存在,所以如果有人可以帮助我的话,我会感激不尽.
Fra*_*ens 13
psql使用本地套接字连接,rails使用localhost over TCP/IP.本地是可信的,localhost需要密码(使用md5).您可以为rails用户设置pgpass文件:http://www.postgresql.org/docs/current/static/libpq-pgpass.html
| 归档时间: |
|
| 查看次数: |
41306 次 |
| 最近记录: |