ruby on rails - PG Error Don't know how to DEBUG -


exiting /users/judyngai/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record    /connection_adapters/postgresql_adapter.rb:1216:in `initialize': not connect          server: no such file or directory (pg::error)     server running locally , accepting     connections on unix domain socket "/tmp/.s.pgsql.5432"? 

i read through posts, suggest adding

host: localhost

to database.yml file

and got new error

exiting /users/judyngai/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record        /connection_adapters/postgresql_adapter.rb:1216:in `initialize':      not connect server: connection refused (pg::error) server running on host "localhost" (::1) , accepting tcp/ip connections on port 5432? not connect server: connection refused server running on host "localhost" (127.0.0.1) , accepting tcp/ip connections on port 5432? 

can point me right direction?

i don't think have given enough information

when

psql --version psql (postgresql) 9.2.4  psql  /usr/local/bin/psql 

i have psql installed on machine

and here database.yml file

test:   adapter: postgresql   encoding: unicode   database: pinny_test   pool: 5   username: judyngai   password:   host: localhost  development:   adapter: postgresql   encoding: unicode   database: pinny_development   pool: 5   username: judyngai   password:   host: localhost 

i uncommented out production part.

it seems have misconfiguration of postgresql. need change configuration in pg_hba.conf. can see answer https://stackoverflow.com/a/7696398/1405852


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -