How to Deploy to Heroku

Pre-requisites

  1. You have a working Heroku acount
  2. You are inside of a Github repository. When you deploy to Heroku, you push the entire local Github repository, not just one folder.
  3. All the changes you want to reflect on your deployed app are added and commited (git add . and git commit).
  4. You can run heroku commands via the command line. To do so, install the Heroku Toolbelt.
  5. Your app works completely on localhost (no syntax errors).
  6. bundle install
  7. Postgres commands work via terminal (which psql and psql/psql -h localhost)

On the terminal run the following

$ heroku login
$ heroku create
$ git push heroku master
$ heroku run rake db:migrate
$ heroku open

Sanity check: before you push to heroku, you can also make sure that a remote is set by running git remote -v. If a line with heroku and then a URL appears in your terminal, than your github repository and herokuapp are connected.

Keep in mind

If you have extra gems installed or Bootstrap, you might need extra configuration. Google to fix errors! For example, for Bootstrap, you either need to run rake assets:precompile or set config.assets.compile = true in production.rb.