Rake db:create fails to connect to server: No such file or directory
<p>I'm trying to upload a rails app to heroku and I'm running into problems to change my app from sqlite3 to postgres, mainly when I run <code>rake db:create</code> I get:</p>

<pre><code>could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
</code></pre>

<p>This is what my database.yml looks like:</p>

<pre><code>default: &amp;default
  adapter: postgresql
  pool: 5
  timeout: 5000

development:
  &lt;&lt;: *default
  database: anagram_development

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  &lt;&lt;: *default
  database: anagram_test

production:
  &lt;&lt;: *default
  database: anagram_production
</code></pre>