Caused by:
PG::ConnectionBad: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory
Is the server running locally and accepting connections on that socket?
AI-generated summary
User natasha_selvidge is encountering PostgreSQL connection issues in a Docker-based local development setup. Initially, they received a socket error indicating PostgreSQL wasn’t running locally 1. After some changes, they now face a TCP/IP connection refusal error to localhost:5432 4, despite it previously working 5. pfaffman suggests ensuring the PostgreSQL container is started first, noting the presence of a database.yml file, and advises against a standard install for development 6. Falco confirms this is a dev environment and moves the thread to Development, asking if the PostgreSQL service is running on the host OS. The core issue appears to be misconfiguration or failure to start the PostgreSQL service within the Docker setup, though the exact cause remains unresolved.
If you’re not following the standard install instructions then you’re mostly on your own, but I see a database.yml in one of your tabs, suggesting that the database is in a separate container, so you’ll want to crank that up first.
This is a development install right? Moving it to Development.
Have you started the postgresql service on your OS?
Now I am getting this error…I don’t get it because it was working fine and now something wrong ![]()
/usr/local/lib/ruby/gems/2.7.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client’: connection to server at “127.0.0.1”, port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished)
Is the server running on that host and accepting TCP/IP connections?
This is just my local install using docker, and it was working before
I guess I could try the standard install next.
No. If it’s development, you don’t want a standard install. I’m not sure what your issue is, though.
