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?
✗ Incorrect
Heroku uses Git to deploy apps, so you must have a Git repository first.
Which file tells Heroku how to start your Rails app?
✗ Incorrect
The Procfile specifies the command Heroku runs to start your app.
How do you push your code to Heroku for deployment?
✗ Incorrect
You push your code to the Heroku remote repository using
git push heroku main.What command runs database migrations on Heroku?
✗ Incorrect
You run migrations on Heroku with
heroku run rails db:migrate.How do you set a secret key environment variable on Heroku?
✗ Incorrect
Use
heroku config:set to set environment variables securely.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.