Skip to content

Commit

Permalink
Put Homebrew location earlier in PATH. This is recommended by the "br…
Browse files Browse the repository at this point in the history
…ew doctor" command and on a fresh machine, *not* doing this will result in an error when trying to create a Postgres database from a Rails app like:


could not connect to server: Permission denied (PGError) 
Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432

However, Postgres will be running. This path change and sourcing of ~/.zshrc must be done *before* installing the "pg" gem.

http://stackoverflow.com/questions/6770649/repairing-postgresql-after-upgrading-to-osx-10-7-lion
  • Loading branch information
Dan Croak committed Oct 22, 2011
1 parent 8382d8d commit f410a97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mac
Expand Up @@ -11,6 +11,12 @@ echo "Installing Homebrew, a good OS X package manager ..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew update

echo "Put Homebrew location earlier in PATH ..."
echo "
# recommended by brew doctor
export PATH='/usr/local/bin:$PATH'" >> ~/.zshrc
source ~/.zshrc

echo "Installing Postgres, a good open source relational database ..."
brew install postgres --no-python

Expand Down

0 comments on commit f410a97

Please sign in to comment.