title: Unable to connect postgres server
body: <p>When I try to connect server to create database. I am getting this error.</p>
  
  <pre><code>Couldn't create database for {"adapter"=&gt;"postgresql", "encoding"=&gt;"unicode", "host"=&gt;"localhost", "socket"=&gt;"/var/run/postgresql/.s.PGSQL.5432", "pool"=&gt;5, "min_messages"=&gt;"error", "database"=&gt;"rails_contributors_test"}
  -- enable_extension("plpgsql")
  rake aborted!
  PG::ConnectionBad: could not connect to server: Connection refused
  Is the server running on host "localhost" (::1) and accepting
  TCP/IP connections on port 5432?
  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?
  </code></pre>
  
  <p>I tried a lot but didn't get success. Looking for help.</p>
  
  <p>Postgres version I have as</p>
  
  <pre><code>which postgres
  =&gt; /usr/local/bin/postgres
  postgres --version
  =&gt; postgres (PostgreSQL) 9.4.4
  </code></pre>