rails/rails — pull request #7898 by olivierlacan (2012-10-10 06:17:16+00:00)
Title: Offer instructions for pg gem when installed via Homebrew

Noticed that when running `rails new appname -d postgresql` the generated `database.yml` still starts with the following:

```ruby
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On Mac OS X with macports:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
```

Added instruction for the widely used Homebrew and clarified:

```ruby
# On OS X with PostgreSQL installed via Homebrew:
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
# On OS X with PostgreSQL installed via MacPorts:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
```