This gist is for installing PostgreSQL using Hombrew and the luncy gem.
$ brew install postgresql
When you install Postgres, you will see a bunch of output in your Terminal. The important sections are Build Notes, Create/Upgrade a Database, and Start/Stop PostgreSQL. Make sure to follow those instructions to the letter.
Create and upgrade a DB
$ initdb /usr/local/var/postgres -E utf8
Homebrew services
$ brew tap gapple/services
Now you can do brew services start/stop/list postgres
$ brew services start postgres
$ brew services list
$ brew services stop postgres
Optional need to create a user or whatever username you want, the -W will prompt for you password, enter your password from your database.yml file
$ createuser -s [username] -W
This gist is from this post - credit where credit is due http://www.moncefbelyamani.com/how-to-install-postgresql-on-a-mac-with-homebrew-and-lunchy/
(gist modified to use brew services)
Happy Rubying =)