High Performance PostgreSQL for Rails: bin/rails db:reset does not work with docker (Page 58)

@andatki

bin/rails db:reset doesn’t work if there is no socket file locally which is the case if I’m running Postgres from a Docker container on OSX.

sh db/setup_test_database.sh → “psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory”

Add -h localhost to the last 3 lines in that file fixed my problem.

1 Like