Modernising a Rails 2/Merb application to Rails 7.1 without a full rewrite
A staged modernisation across framework, runtime, data layer and infrastructure that kept years of working business logic.
- Role
- Consultant principal engineer (principal-led experience)
- Scope
- Framework, Ruby runtime, data layer and operating system
- Approach
- Staged and test-first, no full rewrite
Situation
The application still did valuable work for the business, but it ran on Rails 2 and Merb, Ruby 1.9, DataMapper and Ubuntu 10. Every one of those layers was unsupported, so each change carried more risk than it should.
A rewrite would have meant re-implementing years of behaviour, changing product and technology at once, and waiting a long time before any value returned.
Responsibility
Tarun Mookhey, Pacifica’s principal, worked as consultant principal engineer. He set the migration sequence, built the test safety net and delivered the upgrade.
Work delivered
- Stabilise. Tests around the riskiest boundaries before anything moved.
- Upgrade runtime and framework. Ruby and Rails moved forward in stages.
- Migrate persistence and infrastructure. DataMapper to ActiveRecord; Ubuntu 10 to Ubuntu 22.04.
- Remove compatibility debt. Temporary scaffolding deleted, and normal delivery resumed.
Outcomes
Obsolete framework, runtime, data-layer and operating-system dependencies were removed without discarding verified behaviour. The application returned to a supported foundation from which normal product delivery could continue.
Technical details
| Layer | Before | After |
|---|---|---|
| Framework | Rails 2 / Merb | Rails 7.1 |
| Runtime | Ruby 1.9 | Ruby 3.3 |
| Data layer | DataMapper | ActiveRecord |
| Operating system | Ubuntu 10 | Ubuntu 22.04 |
Framework, runtime, persistence and infrastructure moved as separate, observable stages, so a regression could be traced to one change.
Is an old stack making a valuable application harder to change?
Tell us the current framework, runtime, data layer and deployment path.