Skip to content

Instantly share code, notes, and snippets.

@peterkle
Last active July 3, 2017 19:06
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 peterkle/1a375fa8139cbc43a61761ac993916c7 to your computer and use it in GitHub Desktop.
Save peterkle/1a375fa8139cbc43a61761ac993916c7 to your computer and use it in GitHub Desktop.
Rails setup
# 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