Last active
July 3, 2017 19:06
-
-
Save peterkle/1a375fa8139cbc43a61761ac993916c7 to your computer and use it in GitHub Desktop.
Rails 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
# disable TestUnit, enable api options, use postgres | |
rails new . -T --api --database=postgresql | |
# create postgres user | |
createuser -P user_name | |
# create db | |
createdb db_name | |
#Grant privileges to user, you might need quotes if values have dashes | |
psql db_name | |
grant all privileges on database db_name to user_name; | |
# Help pg commands | |
dropdb db_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment