FATAL: Peer authentication failed for user "shop"
<p>What I did:</p>

<pre><code>sudo -u postgres psql
CREATE ROLE shop CREATEDB LOGIN PASSWORD 'kurt1245';
</code></pre>

<p>Then I cloned a repository from GitHub (a rails application which uses pg), <code>bundle install</code>, edit <code>database.yml</code> to write my password and now after <code>rake db:create</code> (also <code>setup</code> and <code>migrate</code>) doesn't work.</p>

<p><code>database.yml</code>:</p>

<p><code>development:
  adapter: postgresql
  encoding: unicode
  database: shop_development
  pool: 5
  username: shop
  password: kurt1245
test:
  adapter: postgresql
  encoding: unicode
  database: shop_test
  pool: 5
  username: shop
  password: kurt1245
</code></p>