I have multiple versions of PostgreSQL running on my machine (running Ubuntu Trusty).
$ service postgresql status
9.1/main (port 5433): online
9.5/main (port 5432): online
I am running several Ruby apps with ActiveRecord, that are each using different versions of Postgres, and I want to be able to specify the Postgres version in database.yml, something like this:
default: &default
adapter: postgresql
encoding: utf8
version: 9.1
# ... or, since this seems to be close to pg_wrapper's syntax:
cluster: 9.1/main
What I don't want to have to do is specify port: 5433, since that's likely to be different for each version on each machine it's running on. Is there a way to do this?
. gitignoreit and have everyone fill it in with their own details or setDATABASE_URLin the environment.pg_wrapperonly affects utilities that Rails doesn't use (probably with the exception ofpg_dumpfor schema in SQL).