The error was most likely caused by a brew upgrade command that upgraded postgres and now no longer connects correctly.
You can follow the commands below but you will lose prior databases.
$ brew services stop postgres
$ cd /usr/local/var
$ lsYou should see postgres folder. Next we'll move it to a backup.
$ mv postgres postgres-old
$ lsYou should see the renamed postgres folder
Next, we need to uninstall and reinstall postgres. Using --force will uninstall all versions of postgres.
$ brew uninstall --force postgres
$ brew install postgres
$ brew services start postgresThen, recreate any databases you were using
createdb _username_
migrate & seed