Got the dreaded, only-macOs documented "No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432" but you are using wither Mint or Ubuntu?
Here's how to fix it.
-
verify the contents of /etc/postgresql/9.5/main/pg_hba.conf
-
if the file is empty, add this conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 0.0.0.0/32 md5
host all all 127.0.0.1/32 trust
host all all all trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident
-
stop postgresql service with sudo /etc/init.d/postgresql stop
-
start postgresql service with sudo /etc/init.d/postgresql start
-
verify you can connect to the server with psql
sorry, I haven't had this issue for some time now. If you can connect using Postgres but not rails sounds like the error might be on the database.yml config.
You sometimes get this error too when there's a lingering .pid file if the server wasn't shutdown properly.
Good luck