title: Unable to create Database in Rails using rake db:create
body: <p>I created a new rails project and did few configuration changes in <code>database.yml</code>.
  Then had to create the database using the command <code>rake db:create</code> inorder to continue developing the application but I get the error below.</p>
  <pre><code>Els-MacBook-Pro:eshop el$ rake db:create
  warning ../../package.json: No license field                                                                 
  FATAL:  role &quot;eshop&quot; does not exist
  Couldn't create 'eshop_development' database. Please check your configuration.
  rake aborted!
  PG::ConnectionBad: FATAL:  role &quot;eshop&quot; does not exist
  
  Tasks: TOP =&gt; db:create
  (See full trace by running task with --trace)
  Els-MacBook-Pro:eshop el$ 
  </code></pre>
  <p>I will also post the contents of my <code>database.yml</code> below:</p>
  <pre><code>default: &amp;default
    adapter: postgresql
    encoding: unicode
    pool: &lt;%= ENV.fetch(&quot;RAILS_MAX_THREADS&quot;) { 5 } %&gt;
  
  development:
    &lt;&lt;: *default
    host: localhost
    database: eshop_development
    username: eshop
    password: eshop
  
  test:
    &lt;&lt;: *default
    host: localhost
    database: eshop_test
    username: eshop
    password: eshop
  
  production:
    &lt;&lt;: *default
    database: eshop_production
    username: eshop
    password: &lt;%= ENV['ESHOP_DATABASE_PASSWORD'] %&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/iL2Rr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iL2Rr.png" alt="enter image description here" /></a></p>
  <p>I will be grateful if someone can help me figure out why I cannot create a db. I have read all types of solutions and none seems to be working. Thanks.</p>