Skip to content

Instantly share code, notes, and snippets.

@sklise
Created April 28, 2015 13:47
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 sklise/88f4e1187e0926b2f7bf to your computer and use it in GitHub Desktop.
Save sklise/88f4e1187e0926b2f7bf to your computer and use it in GitHub Desktop.

Running sql commands on your Heroku Postgres database, on a mac

  1. Download and install the Postgres.app program. (Skip to step 3 if you already know you have Postgres installed on your Mac)
  2. Add the Postgres.app psql to your $PATH: export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin docs
  3. In Terminal, cd to the folder of your Heroku project, and run heroku pg:psql
  4. You should now be in an interactive PSQL session, by default Heroku will connect to the promoted database set as the config var DATABASE_URL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment