On Nov 3, 2004, at 11:19 AM, craig duncan wrote: > craig duncan wrote: > >> Vincent Foley wrote: >> >>> Is config/database.yml properly configured? An authorization error >>> seems related to username and password. Check out >>> http://www.rubyonrails.org/show/TutorialStepTwo to make sure your >>> PostgreSQL configuration is okay. >>> >> It is. I can't figure out why ident authentication (postgres) >> doesn't seem to work but when i make the first line in pg_hba.conf >> "host all all trust" then every local user has access (e.g. psql >> <database> postgres). database.yml specifies user "postgres". It >> really shouldn't matter, though. IDENT authentication shouldn't even >> be being used. I'm running ruby 1.8.2 on debian unstable, postgresql >> 7.4.6. I saw something somewhere about needing to run an IDENT >> daemon, but could find no verification for that idea. Anyway, as i >> said, IDENT authentication shouldn't even be being used. >> >> >> > The reason why authentication is failing is because this fails: > > psql -h localhost <database> postgres > > without the "-h localhost" it works fine. I can ping localhost. I > don't know why that doesn't work but that's what's keeping Rails > (activerecord) from connecting to postgres. I don't believe postgres accepts connections on the TCP socket by default, only the UNIX socket. You need to edit the postgres config files to set this up for yourself.