Connection refused (PGError) (postgresql and rails)

前端 未结 6 1077
栀梦
栀梦 2020-12-06 01:37

I keep getting this error when i try to run my localhost using \"$rails s\":

(Mac OSX 10.8.3) (ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]) (R

6条回答
  •  自闭症患者
    2020-12-06 02:16

    In postgresql.conf, /var/lib/pgsql/data/postgresql.conf :

    1. change the listen_addresses = 'localhost' to listen_addresses = '*'

    2. enable the default port as 5432, port = 5432

    Also in pg_hba.conf, /var/lib/pgsql/data/pg_hba.conf, try the authentication method as trust

提交回复
热议问题