Postgres issue

FATAL: Peer authentication failed for user “admin”
Couldn’t create database for {“adapter”=>“postgresql”, “encoding”=>“unicode”, “database”=>“bookingsaround_diy_development”, “username”=>“admin”, “password”=>“password”}
rake aborted!
PG::ConnectionBad: FATAL: Peer authentication failed for user “admin”

Tasks: TOP => db:create

Any help

Not able run rake db:setup command failing to run.

Peer Authentication used your OS username and password for access, you may need to change pg_hba.conf and change instances of peer to md5.

This also assumes that the user has been created correctly in the PostgreSQL system.

It may also help to use the lines

host: localhost
port: 5432

In your database.yaml

Have you tried logging in from a shell with those credentials?

Did you really intend to use peer auth on your system? Postgres
offers a variety of authentication schemes; "trust" might be more
appropriate for dev work, but up to you.

Ya, I have tried with the login from the shell which I have given in the database.yml file.

Piyush,

As Mike suggested, can you set host,port setting explicitly in database.yml and

can you re run rake db:create

In terminal I have created a role user and password what I have given in database.yml file by this command below and I solved the problem. Thanks for your reply.
psql -U postgres ------ run console

CREATE ROLE XXXX WITH LOGIN SUPERUSER PASSWORD ‘XXXXX’; ------- to create a role