Skip to content
Lucas Braun edited this page Mar 4, 2017 · 2 revisions

Interaction with Heroku

Getting started

If you haven't already, download the Heroku command line interface (CLI)

brew install heroku

From the repo run heroku create to initialize a new app.

Deploying

To deploy, run git push heroku master.

See https://devcenter.heroku.com/articles/git#deploying-code for more information.

Running migrations

From the repo run heroku run rake db:migrate

See https://devcenter.heroku.com/articles/getting-started-with-rails4#rake for more information.

Running a rails console

From the repo run heroku run rails console.

See https://devcenter.heroku.com/articles/getting-started-with-rails4#console for more information.

Checking the logs

The easiest way to check the error log for the deployed app is to run heroku logs. This prints out the last 100 lines of the log by default.

You can print out more by using the -n option, for example heroku logs -n 200.

See https://devcenter.heroku.com/articles/logging for more information.