title: Cannot create production database on DigitalOcean droplet
body: <p>I tried to deploy my rails app into DigitalOcean following this page.</p>
  
  <p><a href="https://www.digitalocean.com/community/tutorials/how-to-use-the-ruby-on-rails-one-click-application-on-digitalocean#configuration-details" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-use-the-ruby-on-rails-one-click-application-on-digitalocean#configuration-details</a></p>
  
  <p>Everything work fine but i cant create the database via this command</p>
  
  <pre><code>RAILS_ENV=production rake db:create
  </code></pre>
  
  <p>Even i ran this command inside my app folder</p>
  
  <pre><code>chown -R rails: /home/rails/myapp_name
  </code></pre>
  
  <p>This is what i got from the command line</p>
  
  <pre><code>FATAL:  Peer authentication failed for user "rails"
  .
  .
  .
  Couldn't create database for {"adapter"=&gt;"postgresql", "encoding"=&gt;"unicode", "pool"=&gt;5, "database"=&gt;"xxx", "username"=&gt;"rails", "password"=&gt;nil}
  </code></pre>
  
  <p>So how to fix this?</p>
  
  <p>Thanks!</p>