0
0
Ruby on Railsframework~5 mins

Heroku deployment in Ruby on Rails - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Heroku in the context of Rails applications?
Heroku is a cloud platform that lets you deploy, run, and manage Rails apps easily without managing servers.
Click to reveal answer
beginner
Which command initializes a new Git repository if you don't have one before deploying to Heroku?
git init initializes a new Git repository in your project folder.
Click to reveal answer
intermediate
Why do you need a Procfile in a Rails app for Heroku deployment?
A Procfile tells Heroku how to start your app, usually by running the web server.
Click to reveal answer
intermediate
What is the purpose of running heroku run rails db:migrate after deployment?
It runs database migrations on the Heroku server to update the database schema to match your app.
Click to reveal answer
intermediate
How do you set environment variables like secret keys on Heroku?
Use heroku config:set KEY=VALUE to securely set environment variables for your app.
Click to reveal answer
What is the first step to deploy a Rails app to Heroku?
ACreate a Git repository
BRun <code>rails server</code>
CInstall Node.js
DWrite a Dockerfile
Which file tells Heroku how to start your Rails app?
AProcfile
Bdatabase.yml
CGemfile
Dconfig.ru
How do you push your code to Heroku for deployment?
Arails deploy
Bgit push heroku main
Cheroku deploy
Dgit push origin main
What command runs database migrations on Heroku?
Aheroku migrate
Brails db:migrate
Cheroku run rails db:migrate
Dgit migrate
How do you set a secret key environment variable on Heroku?
Agit config secret_key abc123
Bheroku set secret_key=abc123
Crails secret set abc123
Dheroku config:set SECRET_KEY=abc123
Explain the steps to deploy a Rails app to Heroku from a local project.
Think about preparing your app, connecting to Heroku, and updating the database.
You got /6 concepts.
    Describe how environment variables are managed in Heroku for a Rails app.
    Consider how to keep secrets safe and accessible in production.
    You got /4 concepts.