For all `Ubuntu 13.10` users that open this thread follow the steps below to install `postresql`:
sudo sh -c "echo 'deb
[To see links please register here]
precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O -
[To see links please register here]
| sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common -t saucy
sudo apt-get install postgresql-9.2 libpq-dev
since there isn't an official Postgres repository for `Ubuntu 13.10`.
Then create the user as `Nick` explain (you can specify a password too):
sudo su postgres -c psql
postgres=# CREATE ROLE gotqn SUPERUSER LOGIN;
postgres=# \password gotqn
postgres=# \q
Note: Replace the `gotqn` above with `whoami` result:
![enter image description here][1]
The easiest way to create your rails application is to specify you are using `postgresql` as follows:
rails new Demo -d postgresql
The code above will automatically add the `pg` gem in your `GemFile` and create appropriate `database.yml` file:
development:
adapter: postgresql
encoding: unicode
database: Demo_development
pool: 5
username: gotqn
password: mypass
Note: You need to change the username and to specify the correct password if you have set such.
Then run `rake db:create` and start the rails server.
[1]: