Systems | Development | Analytics | API | Testing

Cross-cluster associations in Rails

One of the beauties of the Rails framework is the ability to utilize Ruby on Rails associations in your models. These associations allow you to access collections of records in your code with pleasant syntax, abstracting away the need to write underlying SQL queries. That abstraction holds as long as all your data lives in one place. The moment your tables are spread across separate database clusters, certain association types stop working.

Exploring Rails Action Cable with Solid Cable

Real-time features are becoming increasingly important in web applications, but not every Rails developer is familiar with Action Cable, the framework's built-in WebSocket library. Rails Action Cable has long supported web sockets, but comes with some additional complexity. Rails 8 introduces Solid Cable, a new database-backed adapter for Action Cable that eliminates the need for Redis. In this guide, I'll walk you through Action Cable by way of Solid Cable and show you how to build a real-time feature.

Create a Markdown Editor in Ruby on Rails

In recent years, Markdown has become the lingua franca of plain-text files on the web. If you're a developer, you have read — and maybe even written — hundreds of Markdown documents over the course of your career. GitHub repositories use README files written in Markdown. Stack Overflow and Reddit use it to format posts. Technical documentation, blog posts, and entire books are written in Markdown. And it's not just for humans either!

Kamal 2: Deploying multiple apps

Deploying more than one web application on a single server used to require a lot of infrastructure fiddling. Docker made this better, but some things that are new in Kamal 2 make deploying containerized applications even easier. Kamal is a deployment tool from Basecamp that leans on Docker and its own integrated proxy to simplify deploying web apps. Kamal 2 makes deploying more than one Rails app to the same server easier.

Render a Component Preview In Showcase for Ruby on Rails

In part one of this series, we walked through how to use Showcase in a Rails app. It's now time to read some Ruby code written by experienced Rails developers. To do this without getting lost, we'll choose one feature of the showcase engine and analyze how it works: rendering a preview of a component. Let's get started!

How to Read Code from the Showcase Ruby on Rails Engine

Reading a lot of code from very senior engineers is probably one of the best ways to level up as a Ruby on Rails developer. By doing so, we can learn new tips and techniques that we can reuse in our jobs. Thanks to open source, we can read code written by the best developers from all over the world, and for free! However, reading code from a Ruby gem or a Rails engine for the first time without being guided can be daunting. There are so many files; how do we even know where to start?

20 years of Rails deployments at RailsConf

Today, we're going to have a little history lesson for those of you who haven't been around since forever, but for those of you who have been around since forever, hopefully this will be a nostalgia fest. We can enjoy some good memories together. From FTP to Kamal, an oral history of deploying Rails apps. Watch the video for the full story!

A Deep Dive into Solid Queue for Ruby on Rails

Our previous article in this series established that Solid Queue is an excellent choice if you need a system for processing background jobs. It minimizes external dependencies — no need for Redis! — by storing all jobs in your database. Despite that, it is incredibly performant. But just being performant is not enough for a production-ready background job system. Rails developers have come to expect a lot over the years. We don't just want to enqueue jobs to run in the background.