High Leverage Rails
Introduction
Introduction to this course
Why use Ruby on Rails
Why use SQLite
Ruby on Rails + SQLite
Powering Your App with SQLite
Creating tables
Timestamps
Column types
Typeof
Ruby types
Creating table introduction
Creating table advanced
Inserting data
Updating data
Upserting data
Reading data
Virtual columns
Enums
Introduction to JSON
Indexing JSON
JSON table functions
Building a Modern Rails Application
Creating a new Rails application
Installing Solid Queue
Installing Solid Cache
Installing Solid Cable
Dockerfile
Application overview
Authentication
Base styles
Registration
Scaffolding posts
Polishing posts
Scaffolding comments
Polishing comments
Polishing models
Polishing controllers
Creating new post
Updating post
Reviewing MVP
Tagging posts
Custom tags
Friendly URLs
Full text search
Deploying & Operating Your App
Backups
Check Litestream locally
Verifying backups
Deployment options
Deploying with Hatchbox
Deployment constraints
Vertical scaling
Database access
Migrations
Locked video

Please purchase the course to watch this video.

Video thumbnail
Deploying & Operating Your App
Deployment options

Full Course

$
129
$179
USD, one-time fee
This course came at the perfect time. I’ve recently gotten back into Rails after an 18-year hiatus, and this was a perfect refresher and shows just how much you can accomplish with Rails right out of the box.
Garrett Winder
Garrett Winder

Move fast and fix things

Application monitoring that helps developers get it done.

Rails hosting made simple

Deploy apps to servers that you own and control.

Summary

Learn how to deploy a Rails 8 application to production, comparing deployment options like Kamal for Docker, Hatchbox for managed hosting, and alternatives like Fly.io and Render. This video highlights the best platforms for SQLite-based apps and provides insights on fast, reliable deployments.

Video Transcript

Now that our backup system is in place, we can turn our attention to packaging our application and deploying it to production.

Rails applications offer a wide variety of deployment options. With Rails 8, you now have the Kamal tool, which packages your application as a Docker image and pushes it to a pre-configured server.

While this is a great addition to Rails, I’m not convinced that it’s fully mature enough to recommend to new Rails developers. When I need to ship fast but also ship well, I prefer platform providers that handle deployment efficiently.

Why Heroku Doesn't Work for SQLite in Production

Since we’re building a Rails app using SQLite, we can’t use the most popular Rails deployment platform—Heroku.

Heroku uses an ephemeral file system, meaning that SQLite databases would be lost across deployments. This makes it unsuitable for production applications that rely on persistent data storage.

In recent years, Heroku alternatives like Fly.io and Render have emerged. While I personally haven’t deployed a Rails application on these platforms, I’ve heard positive reviews, and they might be worth exploring if you're looking for Heroku-like simplicity with persistent storage.

Why I Use Hatchbox for Rails Deployment

For my deployments, I use Hatchbox, a Rails-friendly deployment platform.

Hatchbox allows me to:

  • Bring my own servers from providers like DigitalOcean, Hetzner, or Linode.
  • Automate provisioning and updates, ensuring the server is ready to run my application.
  • Connect to GitHub for automatic deployments on each push to main.

I find Hatchbox to be a great balance between the low-level control of Kamal and the ease of use offered by Heroku-like platforms.

For this course, when we deploy Lorem News, we’ll use Hatchbox. I’ll guide you through every step to get your application live on the internet using this provider.

Other Deployment Options

If you're already comfortable with Docker, I recommend giving Kamal a try.

For those who prefer managing their own server, you can provision a VPS (Virtual Private Server) and manually set up Rails, SQLite, and your web server.

One of the biggest advantages of SQLite-backed Rails applications is their low operational complexity:

  • You only need Ruby, Rails, and SQLite installed.
  • A single server can handle all of your application’s needs.

That said, I don’t think managing your own server is the best option if your goal is to ship fast and efficiently, which is what we’re optimizing for in this course.