I am using OSX 10.8 ( looks like some version on Postgres is installed by default ) but still I did these steps one by one and they all succeeded .
brew install postgresql
initdb `brew --prefix`/var/postgres -E utf8
touch Gemfile
bundle config build.pg --with-pg-config=`brew --prefix postgresql`/bin/pg_config
And this is a screen shot of the last success message I saw:

Then I ran this one:
postgres -D `brew --prefix`/var/postgres
And that's the error I get:
postgres cannot access the server configuration file "/usr/local/var/postgre/postgresql.conf": No such file or directory