Suppose that I have a Postgres cluster running, with its Unix domain socket located under /some/custom/path
How do I set up my database.yml so that the Rails app can connect to the cluster?
From the postgres docs:
host: Name of host to connect to. If this begins with a slash, it specifies Unix-domain communication rather than TCP/IP communication; the value is the name of the directory in which the socket file is stored.
The ActiveRecord adapter just passes through the host parameter so it's as simple as just putting this line in your database.yml
:
host: /path/to/socket/file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With