First of all, please excuse my complete absence. I really tried to find a solution there, but now I am stuck and completely misunderstood.
I am trying to deploy a rails 3 application on a remote server; there were no problems when developing on my local virtual machine. But now when I try to run
rake db:create
it fails, with an error (here it translates, since I'm French):
FATAL : password authentication failed for user <<mylogin>>
here is my database.yml:
login: &login adapter: postgresql username: mylogin password: mypassword host: localhost port: 5432 encoding: UTF8 development: <<: *login database: somesite_development test: <<: *login database: somesite_test production: <<: *login database: somesite_production
user "mylogin" was created by postgre-side using the createuser command-line tool. He allowed the creation of dbs. postgresql.conf configures the server to listen on localhost. I tried a lot of things with pg_hba.conf, nobody worked - regardless of the method used (identifier, password, md5) for the user "mylogin" at 127.0.0.1, authentication failed - although I never had problems connecting / creating dbs with psql.
any clue?
EDIT: alright, found out how incredibly stupid I was ... the password for my user is simply not set! I think I forgot the semicolon after
ALTER USER xxxx WITH PASSWORD xxxx;
... I saw this by querying "SELECT * FROM pg_shadow;" - the password field was blank. Three days of my life were wasted because of this dumb mistake ...
source share