educative.io

Got this error when setting up database with docker-compose

Following lesson on docker for rails dev, got below error on postgres lesson

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

In the same terminal, use the following code :
docker-compose exec web bin/rails db:migrate

This solution is also explained in the “Show Solution” button.

Use this after the application shows → You may begin now…