Skip to content

Instantly share code, notes, and snippets.

@scottlingran
Last active October 9, 2015 08:17
Show Gist options
  • Save scottlingran/3468364 to your computer and use it in GitHub Desktop.
Save scottlingran/3468364 to your computer and use it in GitHub Desktop.
Creating a database in Rails
$ psql -U postgres

### CREATION w/o Password
$ createuser
# fill shit in
$ createdb <databasename>
$ psql -U postgres
$ alter user <username>;
# ALTER USER
$ grant all privileges on database (databasename) to (username);
$ \q
$ rake db:migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment