I am using PostgreSQL-12 with ruby 2.7 & rails 6.0.3 on ubuntu desktop 20.04LTS
whenever I try to rails db:create
i get the following error
FATAL: Peer authentication failed for user "postgres"
Couldn't create the 'myap_development' database. Please check your configuration.
rails aborted!
ActiveRecord::NoDatabaseError: FATAL: Peer authentication failed for user "postgres"
i have been tweaking the methods in pg_hba.conf from peer to md5, trust, all to no avail my database.yml configuration is accurate too.
databse.yml
default: &default
adapter: postgresql
encoding: unicode
username: postgres
port: 5432
password: postgres
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
development:
<<: *default
database: myap_development