In the postgres docs:
host: hostname of the connection. If it starts with a slash, it indicates only a Unix domain connection, not a TCP / IP connection; value is the name of the directory in which the socket file is stored.
The ActiveRecord adapter simply passes through the host parameter, so it is as simple as putting this line in yours database.yml:
host: /path/to/socket/file
source
share