Friday, 15 March 2013

ruby - PG Error could not connect to server: Connection refused Is the server running on port 5432? -



ruby - PG Error could not connect to server: Connection refused Is the server running on port 5432? -

i updated machine (macbook pro running mount lion) , ever since then, whenever set rails project, machine craps out , cannot connect pg. currently, error getting when seek go localhost;

pg::error not connect server: connection refused 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? not connect server: connection refused server running on host "localhost" (fe80::1) , accepting tcp/ip connections on port 5432?

here checklist, , list of things have tried;

postgresql version 9.3.4 i have installed through homebrew i have host: localhost in database.yml file rails version 4.1.1, ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.5.0] ran brew uninstall postgresql brew install postgresql tried access postgres.conf file wasn't allowed through pgadmin , command line

ran locate pg_hba.conf , terminal shot out;

warning: locate database (/var/db/locate.database) not exist.

i have tried using rails 4.0 still problem

i can still work on other projects on machine started/finished before updated computer.

when run psql terminal psql: not connect server: no such file or directory server running locally , accepting connections on unix domain socket "/tmp/.s.pgsql.5432"?

i lost here, , not sure else do. help much appreciated.

update:

thanks this question, resolved downloading postgres.app mac. works great now.

this quite easy think because if update mac process running postmaster.pid file missing /usr/local/var/postgres/ here. need start process postgres create postmaster.pid.

if progress running -

stop manually:

pg_ctl -d /usr/local/var/postgres stop -s -m fast

start manually:

pg_ctl -d /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

now working...

ruby osx postgresql ruby-on-rails-4

No comments:

Post a Comment