当我运行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
但我仍然遇到了这个错误。