Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra info about test database connection #311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

linkion
Copy link

@linkion linkion commented Dec 30, 2024

I've been trying to get this to work myself, and I didn't realize that you needed to also configure the test database to also connect to the postgres database. Rails kept giving me some errors that didn't really specify that the test database wasn't connecting.

Error if without test database connection set:

$ rails db:prepare
bin/rails aborted!
ActiveRecord::ConnectionNotEstablished: could not connect to server: No such file or directory (ActiveRecord::ConnectionNotEstablished)
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?


Caused by:
PG::ConnectionBad: could not connect to server: No such file or directory (PG::ConnectionBad)
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Tasks: TOP => db:prepare
(See full trace by running task with --trace)

So here's an extra little bit in the docker-compose.yml that states to also append to the test database.

@linkion linkion requested a review from a team as a code owner December 30, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant