title: Erros in installing PostgreSQL using homebrew
body: <p>I'm using Mac OS X 10.8.5 and trying to install postgreSQL using homebrew. I've fixed several errors and warnings which have occurred when I ran brew info postgresql. However, I don't know how to fix the rest of the problems. </p>
  
  <p>$brew info postgresql</p>
  
  <pre><code>postgresql: stable 9.3.2 (bottled)
  http://www.postgresql.org/
  Conflicts with: postgres-xc
  /usr/local/Cellar/postgresql/9.3.2 (2924 files, 40M) *
    Poured from bottle
  From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/postgresql.rb
  ==&gt; Dependencies
  Required: readline ✔
  Recommended: ossp-uuid ✔
  ==&gt; Options
  --32-bit
      Build 32-bit only
  --enable-dtrace
      Build with DTrace support
  --no-perl
      Build without Perl support
  --no-tcl
      Build without Tcl support
  --without-ossp-uuid
      Build without ossp-uuid support
  --without-python
      Build without python support
  ==&gt; Caveats
  If builds of PostgreSQL 9 are failing and you have version 8.x installed,
  you may need to remove the previous version first. See:
    https://github.com/Homebrew/homebrew/issues/issue/2510
  
  To migrate existing data from a previous major version (pre-9.3) of PostgreSQL, see:
    http://www.postgresql.org/docs/9.3/static/upgrading.html
  
  When installing the postgres gem, including ARCHFLAGS is recommended:
    ARCHFLAGS="-arch x86_64" gem install pg
  
  To install gems without sudo, see the Homebrew wiki.
  
  To have launchd start postgresql at login:
      ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
  Then to load postgresql now:
      launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  Or, if you don't want/need launchctl, you can just run:
      postgres -D /usr/local/var/postgres
  </code></pre>
  
  <p>When I run server, I get: </p>
  
  <pre><code>/usr/local/rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `initialize': could not connect to server: No such file or directory (PG::ConnectionBad)
      Is the server running locally and accepting
      connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
  </code></pre>
  
  <p>I've uninstalled postgresql and reinstalled but seems like I wasn't able to remove the postgresql 8.x version. </p>
  
  <p>I've read several different posts to install and run postgreSQL properly and tried what they've suggested but nothing seems to be working for me. </p>