title: PG::ConnectionBad upgrade to Yosemite and postgresql 9.4.4
body: <p>I just updated my mac OS X to Yosemite, version 10.10.4, and postgresql to: psql (PostgreSQL) 9.4.4.</p>
  
  <p>After running rake db:migrate on my Rails 4.2.1 application, my terminal session is responding with:</p>
  
  <pre><code>rake aborted!
  PG::ConnectionBad: could not connect to server: Connection refused
      Is the server running on host "localhost" (127.0.0.1) and accepting
      TCP/IP connections on port 5432?
  could not connect to server: Connection refused
      Is the server running on host "localhost" (::1) and accepting
      TCP/IP connections on port 5432?
  </code></pre>
  
  <p>Simply entering psql in my terminal session also appears a bit off:</p>
  
  <pre><code>$ psql
  psql: could not connect to server: No such file or directory
      Is the server running locally and accepting
      connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
  </code></pre>
  
  <p>After printing out the logs from, cat /usr/local/var/postgres/server.log, I read: </p>
  
  <pre><code>DETAIL:  The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.4.
  LOG:  skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"
  FATAL:  database files are incompatible with server
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/25970132/pg-tblspc-missing-after-installation-of-os-x-yosemite">this answer</a> on SO, but I a hesitant to just start creating a bunch of directories unless that's really what I am suppose to do. I also found an <a href="https://stackoverflow.com/questions/12472988/postgresql-error-could-not-connect-to-server-no-such-file-or-directory">older answer</a> but am not too sure if it's the one to follow.</p>
  
  <p>This <a href="https://stackoverflow.com/questions/13573204/psql-could-not-connect-to-server-no-such-file-or-directory-mac-os-x">SO answer</a> suggests that I remove a, /usr/local/var/postgres/postmaster.pid, but I do not have one, I have a, /usr/local/var/postgres/postmaster.opts -- should I remove the postmaster.opts?</p>
  
  <p>There appears to be lots of advice, but I am not too sure what to follow. Can someone offer some advice in getting my postgresql database running on my rails application?</p>