What we do
Tools
Industries
Department
How we workLet's talk →
Home/Ruby on Rails Developer for Slow, Outdated Apps
Ruby on Rails Development

A Ruby on Rails Developer for the MVP That Became the Business

The app was built fast, which was the whole point. Now it has paying customers, a few years of data and a Gemfile.lock nobody's opened since launch. Pages that loaded instantly take seconds, and a security advisory for one gem raises a question nobody can answer: what else breaks if we update it?

Why a Rails page that was fast at launch is slow now

Rails makes the database easy to reach without thinking about it. That's what made the MVP quick to build, and it's where the time goes once tables hold real data.

N+1 queries

How you'll know: The log shows the same SELECT fired once per row, and the page gets slower every month as records pile up.

Fix: Load associations up front with includes or preload. The Bullet gem flags these in development, and strict_loading (Rails 6.1 and later) makes a lazy load raise instead of passing quietly.

Missing indexes

How you'll know: One query in the log takes most of the request, usually filtering or sorting on a column nobody indexed.

Fix: Run EXPLAIN on it and add the index. On PostgreSQL, build it with algorithm: :concurrently so the table isn't locked while customers are using it.

Callbacks doing real work on every save

How you'll know: Saving one record takes seconds, and a CSV import runs for an hour.

Fix: after_save hooks that send email, recalculate totals or call another API belong in background jobs, through Active Job with Sidekiq or Solid Queue.

Ruby doing what the database should

How you'll know: Code that loads a whole table with .all and then filters, counts or sums it in a loop.

Fix: Push the filter into the query, use pluck for single columns, and add counter caches where a count shows on every page.

Views rendering partials one by one

How you'll know: The database is quick, but view rendering dominates the request time in the log.

Fix: Render lists with render collection: and add fragment caching on the parts that don't change per visitor.

Getting an old Rails app current, one release at a time

Rails now gives each minor release a year of bug fixes and two years of security fixes. 8.0's security window closed in November 2026, so 8.1 is the line still getting them. The Rails upgrade guide's advice is to move one minor version at a time, and each step below leaves something you can ship.

  1. 1

    Pin down what the app does before touching it

    Write request specs around the flows that pay the bills: sign-up, checkout, billing runs, the admin screens staff use daily. Thin test suites are normal on an MVP. Changing Rails without them isn't safe.

  2. 2

    Check how far behind it really is

    Gemfile.lock .ruby-version

    Note the Rails version, the Ruby version, and run bundle outdated to see which gems have newer releases and which haven't had one in years.

    Watch for: Ruby itself. Rails 8 needs Ruby 3.2 or later, and 3.2 reached end of life in March 2026, so plan to land on 3.3 or newer. Old Rails versions cap the Ruby they'll run on, so the two move in turns.

  3. 3

    Bump one minor version and run the updater

    bin/rails app:update

    It offers changes to config files and writes a new_framework_defaults initializer. Turn those new defaults on one at a time, test, then set config.load_defaults to the new version.

  4. 4

    Clear the deprecation warnings before the next jump

    Each release warns about what the next one removes. Fixing those warnings now is what keeps the following step small.

    Watch for: the big breaks people hit on the way: keyword arguments in Ruby 3.0, the classic autoloader removed in Rails 7, and Webpacker, which is retired and needs replacing with jsbundling or importmaps.

  5. 5

    Replace the gems nobody maintains

    A gem with no release in years won't support the next Rails. Swap it for a maintained one or move the little it does into the app, before it blocks an upgrade.

  6. 6

    Deploy every step

    Ship each minor version to production and let it run before the next one. Moving from 6.1 to 8.1 is five steps, each one small enough to roll back.

Upgrade the Rails app you have, or rebuild it?

Upgrade in place

When the app works and the data model holds up

  • Customers use it daily and the main flows do what they should.
  • The slowness traces to queries and indexes, not to how the data is modeled.
  • You can't pause new features for months while something else gets built.
Rebuild

When the foundations are the problem

  • The data model can't represent how the business works now, and every feature is a workaround.
  • It's so far behind, with so many dead gems, that the upgrade path costs more than starting again.
  • There are no tests and nobody can say what half the app is for.

Most MVP-era Rails apps belong on the left. Fixing a dozen slow queries and walking the versions forward costs a fraction of a rebuild, and customers don't feel it happen.

Questions people ask

Can you take over a Rails app a previous freelancer built?

Yes, and it's a common starting point for n-frames. Before changing anything we read the Gemfile.lock, the schema and whatever tests exist, then run the app against a copy of production data, because that's where the slow pages show themselves. You get a written list of what's behind, what's abandoned and what's slow.

Our app is on an old Rails version. How risky is upgrading it?

It depends on two things: how many minor versions it has to cross and how many of its gems are still maintained. From 7.1, it's a few short steps. From 5.2, it's seven, plus a Ruby upgrade and usually a few gem replacements. The risk drops a lot once the key flows have tests, which is why that's the first step.

The app was fast at launch and is slow now that we have real users. Is that normal?

Very. Queries that never mattered with a few hundred rows start to hurt at a few hundred thousand, especially N+1 queries and missing indexes. They're usually fixable in place, page by page, starting with the slowest pages your customers hit most.

What's the catch with the free quote?

There isn't one. You don't commit to anything by asking, and what we learn looking at the app is yours to keep: which Rails and Ruby versions it's on and which requests are slowest. If the fix is a few indexes and an includes or two, it's quoted as the small job it is.

Which Ruby version should a Rails app be on?

One that's still supported: 3.3, 3.4 or 4.0 now. Ruby 3.2 stopped getting fixes in March 2026, and anything on Ruby 2 is well past it. Rails 8 itself needs at least 3.2, so the Ruby upgrade usually happens partway through the Rails one.

Let's talk

A Rails app that keeps up with its customers again

n-frames takes over Rails apps that started as an MVP and became the business. We profile the slow pages against a copy of real data, fix the queries behind them, and move Rails and Ruby forward a release at a time without holding up your own releases. Asking for a Rails quote costs nothing.

Estimate the jump to Rails 8.1 →

Let's talk

Tell us the one thing your team does manually that eats up time. We read every message and reply within a day.