

If the version number has changed since I've written this tutorial, using the command below won't work for you, so you should make sure to copy the command from your Terminal output. Note that the second command is specific to the version of Postgres that was installed on my machine. Once again, I'm copying and pasting the following commands from my Terminal.

Lunchy is a helpful gem that will allow you to easily start and stop Postgres.
#INSTALL POSTGRESQL FOR MAC INSTALL#
Step 5: Install Lunchy $ gem install lunchy You should do the same, in case the instructions change in the future. I copied and pasted that command directly from the Terminal output. If this is your first time installing Postgres with Homebrew, you'll need to create a database with: $ initdb /usr/local/var/postgres -E utf8 Make sure to follow those instructions to the letter. The important sections are Build Notes, Create/Upgrade a Database, and Start/Stop PostgreSQL. When you install Postgres, you will see a bunch of output in your Terminal that looks like this: Step 3: Install Postgres $ brew install postgresql Step 2: Update Homebrewīefore you install anything with Homebrew, you should always make sure it's up to date and that it's healthy: $ brew update To make sure you have all the tools necessary for Ruby on Rails development, I recommend you follow my tutorial for installing Xcode, Homebrew, Git, RVM, and Ruby on a Mac. If you're working on a brand new Rails app and need to create a new Postgres user and database for your app, I recommend Will Jessop's tutorial or Peter Cooper's screencast. If you've just forked a Ruby on Rails project that requires Postgres, this tutorial will get you up and running in no time. This is a quick guide for installing PostgreSQL ( Postgres for short) on a Mac with Homebrew, and starting and stopping it with Lunchy. This installation process is from MONCEF BELYAMANI
