PG::ConnectionBad error
<p>I quit my <code>rails s</code> and went to restart it quickly and all of a sudden I am getting this weird error:</p>

<pre><code>2016-11-11 18:59:59 -0500: Rack app error handling request { GET /profiles }
#&lt;PG::ConnectionBad: could not connect to server: Connection refused
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
&gt;
</code></pre>

<p>I did some research but nothing helps me properly.</p>

<p>I tried looking for a <code>.pid</code> file in my <code>/usr/local/var/postgres/</code> folder, because some answers suggested I deleted, but my folder doesn't have that.</p>

<p>I even saw something about checking my <code>server.log</code> and I didn't have that in that folder either.</p>

<p>Eventually I stumbled across this command, which I ran successfully:</p>

<pre><code>$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
server starting
</code></pre>

<p>However, that doesn't solve my issue. What it does do though is create a <code>server.log</code> file for me.</p>

<p>That file has the following contents:</p>

<pre><code>LOG:  skipping missing configuration file "/usr/local/var/postgres/postgresql.auto.conf"
FATAL:  database files are incompatible with server
DETAIL:  The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.4.
</code></pre>

<p>I am running the Postgres App from Heroku on macOS Sierra.</p>

<p>What could be causing this and how do I fix it?</p>