How to fix the often forgotten PG::ConnectionBad error