All rails commands give me a PGERROR

Hi,

I have a virtualbox with ubuntu 10.04 and Rails 3.04 installed and working.

A Week ago I installed Postgresql and I finally got the server to connect. I created a number of users and databases to try and resolve the PG error message but to no avail.

The problem is that whenever I issue a command such as 'rake db:migrate' or 'rails c --sandbox' I get a FATAL: password authentication failed for "tom", that me :slight_smile:

I know its redundant to point this out but I am a complete novice. In my defence though I must point out that I take direction very well.

My database.yml is as follows: development: adapter: postgresql database: testdb user: tom password: xxxxxxx pool: 5 timeout: 5000

my pg_hba.conf file is as follows: # databse admin login by UNIX sockets local all postgres --- md5 # 'local' is for Unix domain socket connections only local all all --- md5 # ipv4 local connections host all all 127.0.0.1/32 md5 # ipv6 local connections host all all ::1/128 md5 then a blank line host all postgres 127.0.0.1/32 md5 host all tom 127.0.0.1/32 md5 host all all 192.168.1.1/32 md5 # type database user ip-address ip-mask method host all all 192.168.1.1 255.255.255.0 md5

I have listen_address="*" and password_encryption=on in the postgresql.conf file.

I am not sure if I should put anything in .pgpass

Any suggestions on what I should do next to resolve the authentication error that I get with all of my rails commands?

Thanks in advance.

fuzzy

Just checking the basics here…can you login into PosgreSQL using that user id and password? Type psql -u at the command prompt and then, when prompted, provide your user id and password.

B.

Bryan Crossland wrote in post #987129:

Hi Bryan,

Thanks for your reply.

Yes I can log in as any of the three users that I have … postgres and

two other test users I created in trying to resolve this issue.

what host do you have set in your database.yml ?

Curtis j Schofield wrote in post #987203:

what host do you have set in your database.yml ?

Hello Curtis,

I just looked at my database.yml and I do not have a host listed.

Should I list one and then make it local, ie. host:local?

Thanks,

fuzzy.