运行db:create后出现奇怪的postgres错误

时间:2018-05-01 22:10:21

标签: ruby-on-rails ruby postgresql

当我运行rails db:create时,我收到以下错误:

FATAL:  no pg_hba.conf entry for host "172.18.0.1", user "postgres", database "postgres", SSL off
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "pool"=>5, "timeout"=>5000, "username"=>"postgres", "host"=>"localhost", "port"=>5433, "url"=>nil, "database"=>"mydatabase"}

我不确定如何修复它。我已修改我的pg_hba.conf文件以包含以下行。

host    postgres             postgres             172.18.0.1/32            md5

但我仍然遇到了这个错误。

0 个答案:

没有答案