And yes, I basically copied the answer from above, but since the original error was a "test" user trying to access the "postgres" database, telling him to set it up as "test test" is just going to result in the same error message. Setting it to "all all" will allow all roles to access all databases (provided they can authenticate), which is probably more useful for development.

Apparently the "test" user needs to be able to access the "postgres" database to take certain actions related to the "test" database. This cropped up for me during the db:test:purge task while running "rake spec". It confused me because I'm not explicitly trying to do anything as the "postgres" user.
–
SteveJan 17 '14 at 19:32