Search Postgresql Archives

Ubuntu and Rails postgresql setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux