Skip to content

Instantly share code, notes, and snippets.

@farleyknight
Created May 30, 2011 06:12
Show Gist options
  • Save farleyknight/998510 to your computer and use it in GitHub Desktop.
Save farleyknight/998510 to your computer and use it in GitHub Desktop.
Setup postgresql for Rails testing on Ubuntu
# TODO:
# apt-get install Postgresql
# gem install postgresql
#
# ..more stuff...
#
# Make sure that your postgres account has
# superuser privileges, so "rake postgresql:build_databases"
# works properly
#
sudo -u postgres createuser --superuser $USER
# Use this command to drop into postgres command line
sudo su postgres -c psql
# To delete a user, drop into the console and run 'DROP USER <username>'
# http://www.postgresql.org/docs/7.3/static/sql-dropuser.html
# To delete a database, you can run 'DROP DATABASE <database-name>'
# http://www.postgresql.org/docs/8.2/interactive/sql-dropdatabase.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment