久々にpostgreを使ったプロジェクトの準備をしていたら、PG::ConnectionBad: could not connect to server: No such file or directory と怒られたので対応しました。