All Articles

Migrating from Secrets to Credentials

You may not be aware that, since Rails 7.1, the standard way to store secrets is by using credentials.yml instead of the old secrets.yml.

DEPRECATION WARNING:
`Rails.application.secrets` is deprecated in favor of `Rails.application.credentials`
and will be removed in Rails 7.2.

If you still see this warning, your app uses secrets.yml and the migration applies to you. If you don’t use Rails.application.secrets or config/secrets.yml at all, you can ignore the deprecation and the rest of this post.

The migration itself isn’t hard, but it can take some coordination: if your app runs in several environments, you’ll probably need to work with whoever manages your servers to move everything over. This post walks you through it, and explains why the change matters and what you gain from it.

Read more of Migrating from Secrets to Credentials opens a new window

The Hidden Cost of Your Test Suite

Many Rails teams that we have worked with have a version of the same story: a test suite that grew organically, was never quite prioritized, and now sits somewhere between “unreliable” and “actively avoided.” Maybe tests are slow. Maybe they’re flaky. Maybe coverage gaps makes deployments feel like a roll of the dice. Or a manual battle against a behemoth of a beast. It is likely you have heard engineers gripe about the test’s reliability and may be worried that they are sinking time in the application.

Improving your test suite is one of the highest leverage investments a development team can make even though it’s often deprioritized. While the benefits are not always obvious to those that approve budgets and sign contracts, issues related to the test suite can become a sifon of time, budget and team energy. Optimizing your test suite requires critical knowledge of the application and its business functions that require management and direction from experienced engineers, especially if leveraging AI models.

Read more of The Hidden Cost of Your Test Suite opens a new window

No Node

The Asset Pipeline has had many changes over the years, from not needing NodeJS when using Sprockets, to supporting NodeJS to manage JS dependencies through npm packages, to requiring NodeJS by default with Webpacker, and to not needing NodeJS by default again with ImportMaps.

ImportMaps is a good way to not have NodeJS as a dependency of the application, but it has many limitations (like the lack of TypeScript support) and it requires a lot of work to migrate to it when upgrading older applications.

In this blog post, we will see how to use Bun to remove the need to install NodeJS system-wide, how to use the standalone binary to not require an installation step, and at the same time keep using npm packages as needed to make the transition easier.

Read more of No Node opens a new window

How to Parallelize Your RSpec Test Suite

Waiting over an hour for a test suite to finish is a productivity killer.

On a recent project, that was our reality.

Running the full local RSpec suite took almost 2 hours, making it difficult to get quick feedback and confidently iterate on changes. While there are many ways to optimize test performance opens a new window including fixtures, request stubbing, faster tooling, and more, most of these options require significant effort to implement.

Instead, we explored a simpler approach: bringing parallel test execution to local development. The result was a much faster feedback loop (down to 5 minutes) and a significantly better developer experience.

Read more of How to Parallelize Your RSpec Test Suite opens a new window

How to Leverage PurgeCSS in Your Rails App

It’s common for Rails applications to serve massive CSS files filled with unused Bootstrap, Tailwind, or custom utility classes as projects grow. This bloat isn’t just a developer annoyance—it has a real impact on your users. Every unused kilobyte adds milliseconds to page load time. In this post, we’ll explore what PurgeCSS opens a new window is and how your Rails project can benefit from it.

Read more of How to Leverage PurgeCSS in Your Rails App opens a new window

How to Choose a Gem Wisely

Imagine this scenario: a developer added a pub/sub gem built on top of Sidekiq to handle background event broadcasting in your company’s Rails app. At the time, it was a huge win: instead of building a custom job orchestration system, they could drop in the gem, wire up a few events, and ship a feature in days instead of weeks.

Fast forward a few years: Sidekiq needed an update. You find out the gem wasn’t actively maintained anymore. But by then, the entire application depended on it. Core features like sending notifications, syncing with third-party APIs, and triggering billing logic all ran through this pub/sub layer.

Now you face a painful choice: either keep running on an unmaintained gem and risk breakage every time Sidekiq or Rails is updated, or rip it out and refactor the app to use a supported approach.

What began as a new dependency to save time has turned into a critical piece of fragile infrastructure. The lack of maintenance has turned what should have been a simple dependency update into a full-blown project.

How do we avoid getting into this situation in the first place? In this post, we’ll show you by digging into five critical areas to check before you choose a new gem.

Read more of How to Choose a Gem Wisely opens a new window

Migrating From Sprockets to esbuild in Rails

At FastRuby.io, we spend a lot of time upgrading Ruby and Rails applications. However, we do more than just that, we also pay attention to other areas of the application that can be improved. For example, we recently migrated a customer’s application from Sprockets to JS bundling with esbuild opens a new window .

In this article, I share my experience migrating from Sprockets opens a new window to JS Bundling opens a new window (JavaScript Bundling for Rails).

This is not a step-by-step guide, as each application has its own unique needs. Instead, I discuss the problems I encountered and the approach I took during the migration to JavaScript bundling.

Read more of Migrating From Sprockets to esbuild in Rails opens a new window

Usability Meets Accessibility

People focus so much on <h1> and alt attributes that they forget about usability.

Introduction

When discussing accessibility (a11y), we all focus on the structure of our <h1>/<h2>, the alt image texts, the contrast, and all the necessary rules to be covered. The problem is that during the process, we forget to think about usability: Is the page saying what it is supposed to be saying? Does the image description reflect what you can see there? Or take link text as an example: Does “Read More” explain what content the user is about to access?

Most of the time, usability is overshadowed by a focus on compliance with accessibility standards. As a result, we end up with a site that passes validation but neglects to measure usability… or worse, we don’t even consider it.

Read more of Usability Meets Accessibility opens a new window

Migrating a Rails App from Heroku to Railway

Last weekend I migrated my Doctor’s App from Heroku to Railway.

It’s a multi-tenant Rails app where each hospital gets its own subdomain, one.doctors.com, two.doctors.com, and so on.

Five hospitals, around 25,000 appointments, 9,700+ patients. Not huge, but not trivial either.

Here’s how it went, including the part where I accidentally broke the database.

Read more of Migrating a Rails App from Heroku to Railway opens a new window

Our Rails Upgrade Methodology as Claude Skills

For more than 8 years, we have been publishing detailed guides on how to upgrade Rails applications.

We have documented every minor version from Rails 2.3 through 8.1 in our Rails Upgrade Series opens a new window and distilled our methodology into an ebook: The Complete Guide to Upgrade Rails opens a new window

Our free e-book to upgrade rails is available on the FastRuby.io homepage

All of that knowledge comes from more than 60,000 developer-hours of hands-on upgrade work for companies of all sizes, from solo-founded SaaS products to huge Rails monoliths running at Fortune 500 public companies.

Today, we are making that methodology available to everyone as an open source Claude Code Skill opens a new window : claude-code_rails-upgrade-skill opens a new window .

Read more of Our Rails Upgrade Methodology as Claude Skills opens a new window

Reliable Maintenance for Solo SaaS Founders

For the past twenty years, TitleLeaf opens a new window has been helping educational book publishers maintain and share their content with industry partners such as reviewers, wholesalers, and distributors. Its robust content management system and handcrafted digital solutions simplify the process of sharing metadata, digital assets, and marketing material for the book industry.

Here was the situation

Tim Peterson, Founder of TitleLeaf, is a solopreneur balancing the challenges of entrepreneurship with a flexible lifestyle. One of his dreams is to have more time and freedom to do what he enjoys most—skiing and biking in the mountains of Northern California while still running his company as efficiently as possible.

Peterson’s goal is to build an ever-evolving, feature-rich SaaS service and share his domain knowledge with customers without having to manage a team or chase technical updates:

“I got fed up chasing contractors and micromanaging. I tried hiring and outsourcing, but nothing was the right fit. I just wanted reliable maintenance so I didn’t have to worry about it.”

Read more of Reliable Maintenance for Solo SaaS Founders opens a new window