title: Cannot createdb in postgresql
body: <p>I'm trying to start a Ruby on Rails app with PostgreSQL as the database because once this site is finished I'll be promoting it to another blog that has 259K followers and I just want to anticipate if the user base for my new website gets big. </p>
  
  <p>Anyway I followed this tutorial: <a href="https://gorails.com/setup/osx/10.11-el-capitan" rel="nofollow">https://gorails.com/setup/osx/10.11-el-capitan</a> at first. But when I made my app with PostgreSQL the database would fail to create. </p>
  
  <p>So I stepped back, tried uninstalling and reinstalling postgres, I updated my homebrew, and now I'm following this new tutorial: 
  <a href="https://www.codefellows.org/blog/three-battle-tested-ways-to-install-postgresql#macosx" rel="nofollow">https://www.codefellows.org/blog/three-battle-tested-ways-to-install-postgresql#macosx</a></p>
  
  <p>I'm at the step: Create a Default db Based on Your Username. </p>
  
  <p>I run the command and get this:</p>
  
  <pre><code>Mayas-MacBook-Air:~ mayaah$ which psql
  /usr/local/bin/psql
  Mayas-MacBook-Air:~ mayaah$ createdb `whoami`
  createdb: could not connect to database template1: 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>I don't know what to do from here. I've googled this problem extensively and couldn't find an answer. The only possible problem I can think of is my Mac has very little space left, as I saw something about "shared space" which I don't really understand.</p>
  
  <p>Any insight into this, especially with specific step-by-step command line instructions would be super helpful. Thanks!</p>
  
  <p>Edit:
  Now I found this tutorial: <a href="http://exponential.io/blog/2015/02/21/install-postgresql-on-mac-os-x-via-brew/" rel="nofollow">http://exponential.io/blog/2015/02/21/install-postgresql-on-mac-os-x-via-brew/</a></p>
  
  <p>Tried to run</p>
  
  <pre><code>postgres -D /usr/local/var/postgres
  </code></pre>
  
  <p>Got this:</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.5.
  </code></pre>
  
  <p>I don't know what to do from here either.</p>