The Ruby Dispatch

Ruby and Rails applications are awesome on Fly! This is the home for Ruby-oriented content including Rails, Sinatra, Turbo, Rack, and more.

By Brad Gessler

Rails on Docker

Rails 7.1 is getting an official Dockerfile, which should make it easier to deploy Rails applications to production environments that support Docker. Think of it as a pre-configured Linux box that will work for most Rails applications. That means ...

Read more about Rails on Docker
By Brad Gessler

Monkey Patch Responsibly

What are the hazards of Monkey Patching in Ruby? How you can create a Monkey Patch that you can share responsibly and safely with the Ruby community without causing bugs from forgetting to remove the patch. We live in an imperfect world, which mea...

Read more about Monkey Patch Responsibly
By Brad Gessler

Single File Rails Apps

There's been a few interesting blog posts written about single file Rails applications, but they all seem to stop short of describing practical use cases where you might actually ship a single page Rails application. Problem: I Need a Lightweight...

Read more about Single File Rails Apps
By Sam Ruby

Dockerfile-less-deploys

IntroductionFirst, let's talk about why we decided to use OCI container images in the first place. In short, containers are freaking awesome. They allow us to package up our applications and all of their dependencies into a single, self-contained...

Read more about Dockerfile-less-deploys
By Brad Gessler

Rails Background Jobs With Fly Machines

Fly Machines can boot a VM in 500ms, run a Rails background job, then turn off when it's done. That means you don't have to pay for a server to sit idle if there's no jobs to process and you can have a much more scalable pool of on-demand workers ...

Read more about Rails Background Jobs with Fly Machines
By Sam Ruby

Using TurboStream With the Fetch API

Many people see Rails as a framework that will get you to IPO and beyond. I, personally, I'm more interested in the long tail of applications that are used by only a small group of people. I wrote one such application to schedule heats for ballroo...

Read more about Using TurboStream with the Fetch API
By Brad Gessler

Making Sense of Rails Assets

The Rails asset ecosystem is at peak complexity as it transitions from Sprockets to Importmaps and Propshaft, by way of Webpacker. How does it affect people who build Rails apps? How should Rails plugin developers navigate the transition? Rails ha...

Read more about Making Sense of Rails Assets
By Brad Gessler

Semi-Static Websites

Static websites have exploded in popularity over the past few years. What is it that people like so much about static site generators? Low operational complexity - Static websites can be deployed to a production environment without the need for...

Read more about Semi-Static Websites
By Joshua Sierles

Run Ordinary Rails Apps Globally

If you've used your own Rails application from another continent, you may get the feeling that physics has beaten your performance tuning efforts. Page loads feel a bit sluggish, even with all the right database indexes and fancy CDN-backed assets...

Read more about Run Ordinary Rails Apps Globally