Ubuntu and Rails postgresql setup - Mailing list pgsql-general

From Marco Lobbia
Subject Ubuntu and Rails postgresql setup
Date
Msg-id CAFF_nv4ZcPwg9aNfZLrXW9RTR7RqfqQehVt6fGK9PmMDaqpOVA@mail.gmail.com
Whole thread Raw
Responses Re: Ubuntu and Rails postgresql setup  (John R Pierce <pierce@hogranch.com>)
Re: Ubuntu and Rails postgresql setup  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Ubuntu and Rails postgresql setup  (Paul Jungwirth <pj@illuminatedcomputing.com>)
List pgsql-general
I am on a Ubuntu 14.04 LTS machine.

I found useful information on how to configure PostgreSQL in Ubuntu for Rails development at help.ubuntu.com, at Heroku and at digitalocean.com.

In the PostgreSQL documentation I could not find instructions related to setup after installation with PPA and about configuration for Rails, but only setup instructions after installation from souce code.

Putting everything together, all the information seems to converge on the necessity of creating a database superuser with login name that match my Ubuntu user name with:

sudo -u postgres createuser --superuser $USER

When time arrives to create a password for the new superuser with sudo -u postgres psql , I am wondering if Rails can use PostgreSQL without setting the password, if this password can and should be different from my Ubuntu account password and also whether database.yml could be a security concern when pushing to Git repository hosting web sites and to Heroku.
Indatabase.yml in fact is recorded exactly this kind of sensitive information.

According to Heroku it is necessary "to export the DATABASE_URL environment variable for your app to connect to it when running locally", with:

export DATABASE_URL=postgres:///$(whoami)

Is that really necessary? At help.ubuntu.com and digitalocean.com this information is not reported.

Finally I am wondering whether the choice of installing PostgreSQL through the PostgreSQL apt repository would be safe enough or it would be preferable to install the LTS version of Ubuntu.

pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: How to generate are own apt packages for ubuntu?
Next
From: John R Pierce
Date:
Subject: Re: Ubuntu and Rails postgresql setup