Knowledge
  • ⚡️ Knowledge
  • Talks I like
  • Thinking
  • Unix
  • CSS
    • CSS
  • Git
    • git
  • business
    • concepts
  • databases
    • PostgreSQL
  • dev-ops
    • Docker
    • heroku
  • javascript
    • javascript
    • Jest
    • Readme
      • General
      • Libraries
        • React_DnD
  • npm
    • npm cheatsheet
  • people
    • Active Listening
  • productivity
    • focus
    • reviews
  • reading-log
    • 12 Rules for Life
    • nonfiction
  • ruby-on-rails
    • Active Storage
    • bundler
    • file-io
    • Migrations
    • patterns
    • rake-tasks
    • views
  • stoicism
    • Notes
  • food-drink
    • coffee
      • Coffee Beans
  • tools
    • macOS
      • Things
    • services
      • Trello
Powered by GitBook
On this page
  • Content
  • Basic Resources
  • Situations
  • Deploying a rails app with pending migrations
  • Deploying to heroku with an existing app and soruce code cloned from github
  1. dev-ops

heroku

PreviousDockerNextjavascript

Last updated 6 years ago

This living document provides a list of useful snippets reagarding working with as well as so guidance for problems I faced myself and and want to be able to solve faster the next time I encounter them.

Content

Basic Resources

  • The Heroku DevCenter provides guidance to basically everything that can be done with Heroku.

  • or heroku help

Situations

Deploying a rails app with pending migrations

Remember that heroku does not run database migration for raisl applications automatically whil deploying (at least, not by default). You might encounter errors in the deployed version that are due to missing database migrations. To run migrations from the CLI: heroku run rails db:migrate --app your-heroku-application-name Afterwards, you app still might be not functioning correct, because it is in a transient state, database-wise. Usually, a restart of the app should fix this. To restart the app, go to the web interface or run heroku ps:restart --app your-heroku-application-name.

Deploying to heroku with an existing app and soruce code cloned from github

It really is as simple as adding heroku to the repositories remotes: heroku git:remote --app your-heroku-application-name. You can verify this by running git remote -v:

heroku    https://git.heroku.com/your-heroku-application-name.git (fetch)
heroku    https://git.heroku.com/your-heroku-application-name.git (push)
origin    git@github.com:user/repository.git (fetch)
origin    git@github.com:user/repository.git (push)

Resources

Stack Overlow Question

: Make sure you use the Heroku name of your application, not the one that you ight have used on your local filesystem. If you are not sure what the app name is, check the Heroku Web-Interface or run heroku apps

This
1
Heroku
Heroku DevCenter
Heroku CLI Commands
Basic Resources
Situations
1