2

I am trying to follow this railscast tutorial. Now I am in the step, where you create the database with rake db:create:all, but I got this error message :

FATAL:  password authentication failed for user aldila

I made the user aldila through pgAdmin, by right-clicking the login role and add user aldila with password.

So, here is my database.yml :

development:
   adapter: postgresql
   host: localhost
   encoding: unicode
   database: my_app_development
   pool: 5
   username: aldila
   password: *mypass*

test:
   adapter: postgresql
   host: localhost
   encoding: unicode
   database: my_app_test
   pool: 5
   username: aldila
   password: *mypass*

production:
   adapter: postgresql
   host: localhost
   encoding: unicode
   database: my_app_production
   pool: 5
   username: aldila
   password: *mypass*

Here is my pg_hba.conf

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# 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.
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

Maybe there is something's wrong with the installing of PostreSQL, because if I type psql --version on my command, this is what I got :

'psql' is not recognized as an internal or external command,
operable program or batch file.

But I have no idea what went wrong. I install it from here and pick download the installer from EnterpriseDB for all supported versions.

I know there are already similar questions like this, but I follow this one and this one, but I still get the same error message. I would be really appreciated, if anyone could help. Thanks

3
  • Are you using devise? Maybe you forgot to add password_confirmation. Commented May 6, 2013 at 15:14
  • No, I don't. Do you mean to create the login role for database? I used pgAdmin and add login role through pgAdmin, if that's what you mean. Commented May 6, 2013 at 15:16
  • What OS are you using? Commented May 6, 2013 at 19:05

1 Answer 1

2

Your postgresSQL password didn't match your database.rb's password.. it depends on what environment you are using..

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.