The scenario is common. An SME had its business application built in Ruby on Rails by a freelancer or a small agency. The tool runs, teams use it every day, then the developer moves on to another assignment, stops answering, or closes their business. Nobody in-house knows how to deploy, the Rails version is no longer maintained and the slightest change becomes a gamble. The good news: Rails is a highly conventional framework. An experienced Rails developer quickly finds their bearings in code they did not write, provided they follow a method. This article details the one we apply at Akolads when a client hands us an orphaned application: what to recover first, what the audit must contain, how to secure production before touching the code, and how to choose between takeover, upgrade and rewrite. A complete checklist, ready to copy, closes the article.
The signs of an abandoned Rails application
An application does not need to be down to be abandoned. The symptoms set in gradually, and it is often an incident that reveals them. If your provider can still be reached but is simply less available, the process is simpler: see our guide to switching Ruby on Rails providers.
Nobody knows how to deploy anymore
Deployment relied on a command run from the developer's machine, or on a server configured by hand. Without them, no fix can go to production, even an urgent one.
The versions are no longer maintained
Ruby and Rails publish security fixes only for recent versions. An application left on an old version no longer receives those fixes. Gems (libraries) follow the same path and end up blocking any update.
Access is scattered
The domain name, the hosting, the Git repository or the third-party services are in the developer's name, on their bank card or on their personal account. The day they disappear, the company no longer controls its own tool.
Every change breaks something else
Without automated tests, a fix to invoicing can break the accounting export. Teams end up no longer asking for anything, and the application freezes in place.
| Symptom | Main risk | Urgency |
|---|---|---|
| No access to the server or the hosting provider | Impossible to fix an outage | Immediate |
| Domain in the developer's name | Loss of the domain when it expires | Immediate |
| No verified backup | Permanent data loss | Immediate |
| Unsupported Rails version | Unpatched security vulnerabilities | A few weeks |
| No automated tests | Regressions with every change | To be handled during stabilization |
Step 1: recover all access to the application
Before reading a single line of code, you need to take back control. This is the most urgent step, and often the longest when the developer no longer answers.
The source code and its history
Recover the complete Git repository, with the full history and all branches, not a zip archive. The history tells you why the code is written the way it is. Check that the repository (GitHub, GitLab, Bitbucket) belongs to a company account.
Infrastructure and data
- Hosting provider: administration account for the server or the platform (Heroku, Scalingo, VPS, AWS).
- Database: direct access and, above all, a recent backup that you downloaded yourself.
- Domain name and DNS: the registrar account must be in the company's name, with an email address you control.
- Rails secrets: the
config/master.keyfile (or theRAILS_MASTER_KEYvariable). Without it, the credentials encrypted incredentials.yml.encare unreadable.
Third-party services
List everything the application calls: payment (Stripe), email sending (Brevo, Postmark, SendGrid), file storage (S3), maps, business APIs. For each one, you need an account in the company's name and keys that you can regenerate.
An application for which you own neither the domain, nor the repository, nor the database does not really belong to you. The takeover starts there.
If the developer no longer answers
The contract or the invoices generally prove the transfer of the code. The hosting provider and the registrar have recovery procedures for the legitimate holder. In the most blocked cases, it is still possible to start again from the application in production: the code and the database are then recovered from the server, if you still have access to it.
Step 2: audit the Rails code and infrastructure
The audit serves to measure the real state of the application before committing to anything. It avoids blind quotes and unpleasant surprises along the way. The details of our approach are on the Ruby on Rails application audit page.
Versions and dependencies
We record the version of Ruby, of Rails and of each gem, then compare them with the maintained versions. The bundler-audit tool lists the dependencies that have known vulnerabilities. We also spot the gems abandoned by their authors, which will block the future upgrade.
Security
Brakeman scans the code for SQL injections, XSS vulnerabilities or unfiltered parameters. We then manually check authentication, access rights and secrets management. Our security best practices for Rails applications cover these points in detail.
Code quality and tests
We measure test coverage and spot the risk areas: controllers several hundred lines long, scattered business logic, monkey patches that change the behavior of Rails, gems forked and left unmaintained. The database schema is also reviewed (missing indexes, absent constraints, inconsistent data).
The deliverable
| Part of the report | What it tells you |
|---|---|
| Mapping | The features, the third-party services, the infrastructure |
| Ranked risks | What is urgent, important or simply to be monitored |
| Version status | The gap with the maintained versions and the obstacles to updating |
| Recommendation | Maintenance, upgrade or partial rewrite, with an order of priority |
For a mid-sized application, the audit takes a few days. It is a short investment given the decisions it informs.
Step 3: stabilize production before making changes
The natural reflex is to fix right away the bugs that teams report. That is a mistake. First you must be able to roll back if something breaks.
Tested backups
A backup only exists if you have managed to restore it. We set up automatic daily backups of the database, stored off the server, and we run a full restore on a test environment.
Error monitoring
A tool such as Sentry, Honeybadger or AppSignal reports every error users run into. Within a few days, we know what really breaks in production, and how often.
A reproducible deployment
Deployment must fit in one documented command, run by any developer on the team. A tool such as Kamal to deploy a Rails application makes this step simple, without depending on one particular machine. We add a staging environment to test before shipping.
Tests on the critical paths
There is no point aiming for full coverage right away. We first write end-to-end tests on the 5 to 10 paths the company cannot do without: login, order creation, invoicing, export. They act as a safety net for everything that follows.
A stabilized application has not necessarily changed in the eyes of its users. But for the first time, it can be modified without holding your breath.
Step 4: maintain, upgrade or rewrite
Once the application has been audited and stabilized, the decision is made on facts. In the vast majority of cases, a full rewrite is not the right answer: it is expensive, takes months and loses years of business rules accumulated in the code.
Simple maintenance
If the versions are recent and the code readable, it is enough to organize regular maintenance: fixes, security updates, small changes. That is the purpose of our Rails application maintenance offer.
Gradual upgrade
If Rails is several versions behind, we upgrade one version at a time, fixing the deprecation warnings at each stage, with the tests written during stabilization as a safeguard. Our Rails takeover and upgrade page details the approach.
Partial rewrite
When part of the code truly cannot be salvaged (an incomprehensible invoicing module, a cobbled-together internal API), we rewrite it alone, behind a stable interface, while the rest keeps running. For very old applications or ones written in another technology, see our guide to migrating a legacy application to Rails 8.
| Option | When to choose it | Risk |
|---|---|---|
| Maintenance | Recent versions, readable code | Low |
| Upgrade | Unsupported Rails or Ruby, salvageable code | Controlled, if tests exist |
| Partial rewrite | One module beyond repair, the rest healthy | Medium, limited to the module |
| Full rewrite | Business need completely changed, or unusable code | High (timelines, loss of business rules) |
The complete checklist for taking over a Rails application
To copy and tick off, in order. Every unticked line is an identified risk.
Access and ownership
- Git repository complete (history and branches) on a company account
- Domain name in the company's name, contact email under your control
- Hosting provider: company administrator account
- Database: direct access and downloaded backup
- master.key or
RAILS_MASTER_KEYrecovered and stored in a safe place - Third-party services listed, accounts transferred, keys regenerated
Audit
- Versions of Ruby, Rails and the gems recorded
- bundler-audit and Brakeman run, results ranked
- Test coverage measured, risk areas identified
- Database schema reviewed (indexes, constraints, data)
- Report with ranked risks and a recommendation
Stabilization
- Automatic backups off the server, restore tested
- Error monitoring in place
- Deployment documented and reproducible
- Staging available
- End-to-end tests on the critical paths
Decision and next steps
- Option chosen: maintenance, upgrade or partial rewrite
- Roadmap prioritized and shared with the teams
- Documentation kept minimal (installation, deployment, architecture) so you no longer depend on a single person
FAQ
Can you take over a Rails application without the previous developer?
Yes, in the vast majority of cases. Rails enforces strong conventions: an experienced Rails developer quickly finds the structure of an application they did not write.
The real blocker is access. With the Git repository, the database, the master.key and access to the hosting provider, the takeover is possible without the previous provider's help.
How long does it take to take over a Ruby on Rails application?
For a mid-sized application, the audit takes a few days and stabilization (backups, monitoring, deployment, first tests) a few weeks.
The upgrade that follows depends on the gap with current versions and on the state of the tests: the audit is what makes a serious estimate possible.
Should a Rails application that is too old be rewritten?
Rarely. A full rewrite takes months and loses business rules accumulated in the code.
We favor a gradual upgrade, one Rails version at a time, and a targeted rewrite of only the modules that cannot be salvaged.
What should you do if the freelancer will not give access to the code?
First check the contract and the invoices: they generally provide for the transfer of rights to the code developed for you.
On the technical side, if you still have access to the server, the code and the database can be recovered directly from production. The hosting provider and the registrar also have procedures for the legitimate account holder.
What is the master.key in a Rails application?
It is the key that decrypts the config/credentials.yml.enc file, where Rails stores sensitive credentials: API keys, passwords for third-party services.
It is never in the Git repository. If it is lost, every secret has to be regenerated, which is why recovering it at the very start of the takeover matters.