I am creating a rails app and want to use postgresql. I have installed pgadmin, postgres sever on Ubuntu 14.04. I've tried creating a connection through pgAdmin but not able to create it. I am unable to configure pgadmin to create a connection to pg server.
I've tried editing the /etc/postgresql/9.3/main/pg_hba.conf file, but  I get the following error: 
FATAL: Peer authentication failed for user "postgres"
here is 'pg_hba.conf' file
Database administrative login by Unix domain socket
local   all             postgres                                peer
TYPE  DATABASE        USER            ADDRESS                 METHOD
"local" is for Unix domain socket connections only
local   all             all                                     peer
IPv4 local connections:
host    all             all             127.0.0.1/32            md5
IPv6 local connections:
host    all             all             ::1/128                 md5
Allow replication connections from localhost, by a user with the
replication privilege.
local   replication     postgres                                peer
host    replication     postgres        127.0.0.1/32            md5
host    replication     postgres        ::1/128                 md5
I would be grateful if someone could provide some help with configuration.
 
     
     
    
