Skip to content

Instantly share code, notes, and snippets.

@katlandreth
katlandreth / startpostgress.md
Last active August 29, 2016 14:23
Postgress Server Snippets
@katlandreth
katlandreth / environments-on-heroku.md
Last active November 6, 2022 18:15
Create Staging and Production apps on Heroku with corrisponding git branches

##Set-up

  • create a heroku account
  • install the heroku toolbelt: https://toolbelt.heroku.com/
  • log into heroku via the commandline with heroku login and enter your credentials.
  • add your AWS (or other) keys to the heroku environment (I did this from the webapp -from your apps list, click on your appname, then Settings > Reveal Config Vars and add your config variables)

##Create your app

  • in your terminal, cd to your app on your local machine
@katlandreth
katlandreth / reset-heroku-db.md
Created September 15, 2016 21:10
How to drop and rebuild a database on Heroku.

##Problem: While trying to deploy an app to heroku, a table was chronically not found, preventing asset precompile.

Migrating the db on heroku would seem successfull, but trying to push to heroku would result in this error:

remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "********" does not exist
.