From: | Marco Lobbia <ml(dot)mailists(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Ubuntu and Rails postgresql setup |
Date: | 2016-02-24 08:34:40 |
Message-ID: | CAFF_nv4ZcPwg9aNfZLrXW9RTR7RqfqQehVt6fGK9PmMDaqpOVA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
<https://help.ubuntu.com/community/PostgreSQL>, at Heroku
<https://devcenter.heroku.com/articles/heroku-postgresql#local-setup> and
at digitalocean.com
<https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-ruby-on-rails-application-on-ubuntu-14-04>
.
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
<https://devcenter.heroku.com/articles/heroku-postgresql#local-setup> 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
<https://help.ubuntu.com/community/PostgreSQL> and digitalocean.com
<https://www.digitalocean.com/community/tutorials/how-to-use-postgresql-with-your-ruby-on-rails-application-on-ubuntu-14-04>
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.
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2016-02-24 09:10:06 | Re: Ubuntu and Rails postgresql setup |
Previous Message | MEERA | 2016-02-24 07:59:24 | Re: FreeBSD x86 and x86_64 |