Last active
June 13, 2016 17:53
-
-
Save joecorcoran/02217948fa1e80d26b56 to your computer and use it in GitHub Desktop.
Postgresql setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in line 4: it is necessary to type: psql postgres
then it works! Thanks for explanation!