Skip to content

Instantly share code, notes, and snippets.

@jbmyid
Created February 3, 2014 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbmyid/8780079 to your computer and use it in GitHub Desktop.
Save jbmyid/8780079 to your computer and use it in GitHub Desktop.
f you installed postresql on your server then just host: localhost to database.yml, I usually throw it in around where it says pool: 5. Otherwise if it's not localhost definitely tell that app where to find its database.
development:
adapter: postgresql
encoding: unicode
database: kickrstack_development
host: localhost
pool: 5
username: kickrstack
password: secret
Make sure your user credentials are set correctly by creating a database and assigning ownership to your app's user to establish the connection. To create a new user in postgresql 9 run:
sudo -u postgres psql
set the postgresql user password if you haven't, it's just backslash password.
postgres=# \password
Create a new user and password and the user's new database:
postgres=# create user guy_on_stackoverflow with password 'keepitonthedl';
postgres=# create database dcaclab_development owner guy_on_stackoverflow;
Now update your database.yml file after you've confirmed creating the database, user, password and set these privileges. Don't forget host: localhost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment