Skip to content
stackworx

Upgrading an old Rails app without a rewrite

Share this blog with your network

Upgrade Rails, skip the rewrite: version steps from Rails 6.1 to 8.1

An old Rails application rarely needs a rewrite. In most cases the faster and safer path is to upgrade it in steps: add tests around the parts that matter, move one Rails minor version at a time, fix deprecations as you go, and replace the worst areas gradually. A rewrite makes sense only when the application's core model no longer fits the business, and even then it is usually safer to replace it piece by piece.

This guide explains why upgrading matters now, how to plan it, what it typically involves, and when a rebuild is the honest answer.

Why an outdated Rails version is a business risk

The Rails maintenance policy gives each minor release series bug fixes for one year and security fixes for two years after its first release. As of September 2026, the policy page lists 8.1 and 8.0 as supported, with 8.0's security support ending in November 2026. Applications on older series no longer receive official security releases.

Ruby has its own schedule. According to endoflife.date, Ruby 3.2 reached end of life in March 2026, leaving 3.3, 3.4, and 4.0 supported. Older Ruby versions also limit which gem versions you can install, including security patches.

Beyond security, an outdated stack causes slower, more expensive work:

  • New gems and API clients no longer support your versions.
  • Hosting platforms retire old runtimes, forcing an upgrade on their schedule instead of yours.
  • Developers spend time working around old limitations instead of building features.
  • Hiring and onboarding get harder when the stack is years behind.

Signs your application needs attention

  • Nobody on the team is confident about what an upgrade would break.
  • The test suite is slow, flaky, or mostly missing.
  • Some gems are pinned to old versions or forked because upgrades failed.
  • Deploys are rare and stressful.
  • Security scanners report vulnerable dependencies you cannot update.

Rewrite or upgrade: an honest comparison

Incremental upgradeFull rewrite
Business value deliveredThroughout the projectMostly at the end
Existing behaviorKept, including edge cases nobody documentedMust be rediscovered and rebuilt
Feature work during the projectContinuesOften paused or done twice
Risk profileMany small, reversible changesOne large cutover
When it fitsThe data model still matches the businessThe core model no longer fits, or the platform itself must change

Martin Fowler's description of the strangler fig approach explains why incremental replacement tends to work better: rewrites take a long time while users still need new features, and the details of existing behavior are hard to reconstruct. Replacing pieces gradually delivers value earlier and lets you learn as you go.

How to plan the upgrade

1. Assess before estimating

Record the current Rails and Ruby versions, list gems with their compatibility, check test coverage on critical paths, and review how the app is deployed. A short assessment turns "we have no idea" into a list of known work.

2. Protect what makes money

Before changing versions, add tests around the flows the business cannot afford to break: sign-up, checkout, billing, integrations, and key reports. The Rails upgrade guide recommends good test coverage before you start. It does not need to be complete, only focused on what matters.

3. Move one minor version at a time

The official guide advises moving one minor version at a time so deprecation warnings can guide you. Going from 6.1 to 8.1 means stepping through 7.0, 7.1, 7.2, and 8.0, fixing warnings and failures at each stage, and deploying each step if possible.

4. Adopt new defaults gradually

Running bin/rails app:update generates a new framework defaults file. You can enable new defaults one at a time across deploys, then update config.load_defaults when all are on. This keeps each behavior change small and reversible.

5. Upgrade Ruby alongside, not all at once

Ruby and Rails versions have compatibility ranges. Plan the order so each step uses a supported combination, and upgrade Ruby when the Rails version allows it.

6. Deal with the dead weight

Abandoned gems, unused features, and old integrations make every step harder. Removing code that nobody uses is often the cheapest part of an upgrade.

If you are not sure how far behind your application is or what an upgrade would involve, bring your Gemfile.lock and a short description of your deploy process to a Systems Discovery Call. We can tell you what the work likely looks like.

What drives the effort

We do not quote upgrade costs without looking at the code, because the same version jump can be small or large. The main cost drivers are:

  • How many versions you are behind, for both Rails and Ruby.
  • Test coverage on critical flows.
  • Number of gems, especially abandoned or forked ones.
  • Monkey patches and overrides of Rails internals.
  • Front-end tooling, such as an old asset pipeline or Webpacker setup.
  • How easy it is to deploy small changes safely.

Keeping it from happening again

An upgrade is a one-time cost. Falling behind again is a choice. Teams that stay current usually have:

  • Scheduled dependency updates, such as monthly.
  • A test suite that runs on every change.
  • Deprecation warnings treated as work items.
  • An engineering owner responsible for the platform, not only for features.

That last point is where long-term ownership pays off. The projects on our case studies page, including Rails platforms such as Zentap, each grew from one build into a long-term partnership. Keeping a platform current is part of owning it.

Common questions

Can we skip versions to save time?

You can try, but you lose the deprecation warnings that tell you what will break next. Stepping through versions is usually faster overall because each problem is smaller and easier to locate.

Can feature work continue during an upgrade?

Yes, and it should. Keep upgrade changes in small, frequently merged steps so feature branches do not drift far from the upgraded code.

What if there are almost no tests?

Start with a small set of high-level tests on critical flows. Add more around each area as you touch it. This is normal for older applications and should not block the upgrade.

Next step

If your Rails application is behind and you want a realistic plan instead of a rewrite pitch, book a Systems Discovery Call. It is 45 minutes on your application, how it is deployed, and what the business depends on. You leave with a clear picture of what to do first, whether you hire us or not.

Farooq Ch, CEO & Founder of Stackworx

Farooq Ch

Oct 2026