Error
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/pgsql_socket/.s.PGSQL.5432"?
Solution
Run this commands
$ gem uninstall pg
$ cd my-rails-app/
$ bundle install
More information here
https://postgresapp.com/
Using brew?
pg_ctl -D /usr/local/var/postgres start