Postgresql, Rails and OS X Lion: Permission denied.

I'm following this guide
to set up the environment, but for the life of me can't get tests
passed for postgres.

When I do rake test_postregsql in activerecord folder I get:

postgresql_adapter.rb:1063:in `initialize': could not connect to
server: Permission denied (PGError)
         Is the server running locally and accepting
         connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.

I tried to install postgres with homebrew and from dmg. Added /usr/
local/bin to $PATH.
Basically tried everything I could google about it but nothing helped.
Anyone bumped into similar situation?

Are you sure do you have the service running?
Can you access it through command line?

Be careful as Lion ships with postgre tools… What’s the result of this: which psql

Please, take this discussion at rubyonrais-talk. This list is for core-related discussions only.