###Deploying to Heroku (Heroku official instructions)
##Initial Heroku set-up
- Sign up for Heroku
- Download Heroku toolbelt
- Log in to Heroku from terminal (execute command heroku login)
##Set up PostgreSQL
- Replace the sqlite3 gem with pg in the gem file
- Run bundle install
- If you get a Postgres install error download postgresql as an app from postgresapp.com
- Config the Rails database to use postgresql instead of sqlite. The database file can be found under config/database.yml
- Change database names in the config file (name appropriately for each environment. ex: my_app_dev and my_app_prod)
- Run rake db:create. This will create the database under the PostgreSQL install.
- Run rake db:migrate.
- If you have a seed file run rake db:seed
##Create Heroku instance and deploy
-
Create heroku instance (make sure this is a git inventory first). Run heroku create from the terminal. To confirm that this worked run git remote. This should return heroku as one of the destinations.
-
Push app to heroku. Run git push heroku master.
-
Once everything is pushed, you should be able to run heroku open from the terminal. This will run your live app from the browser.
-
If you run into any database errors from Heroku execute the following command from terminal: heroku run rake db:migrate