Skip to content

Instantly share code, notes, and snippets.

@joecorcoran
Last active June 13, 2016 17:53
Show Gist options
  • Save joecorcoran/02217948fa1e80d26b56 to your computer and use it in GitHub Desktop.
Save joecorcoran/02217948fa1e80d26b56 to your computer and use it in GitHub Desktop.
Postgresql setup
# In your terminal (Mac OS X):
createuser -s pguser
psql postgres
# In your terminal (Ubuntu):
sudo -u postgres createuser -s pguser
sudo -u postgres psql
---
# The previous command opened the Postgresql console.
# In here you can enter the following command and then
# enter the password pguser_password (twice)...
\password pguser
# When you're done, this command quits the Postgresql
# console...
\q
---
# In config/database.yml, add this to the default group:
host: localhost
username: pguser
password: pguser_password
# Then change the names of the databases to:
# diversity_ticketing_development
# diversity_ticketing_test
# diversity_ticketing_production
---
# Finally, in your terminal, run the following
# to create your database...
rake db:create
@sabrina-ulbrich
Copy link

in line 4: it is necessary to type: psql postgres
then it works! Thanks for explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment