Migrating a Rails App From Heroku to Railway - FastRuby.io | Rails Upgrade Service
17-Apr-2026 278
How I migrated a multi-tenant Rails app from Heroku to Railway in about an hour, including the part where I accidentally broke the database.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.
The setup
I already had a Railway project running with a test domain (*.juanvasquez.dev) from earlier experiments. The web service was deployed from GitHub and the Postgres 17 instance was co-located in us-east4. Cloudflare R2 handles file storage, that stays the same regardless of where the app runs.
The plan was simple: put Heroku in maintenance mode, dump the database, restore it to Railway, flip the DNS, and go home.
.
Migrating a Rails App From Heroku to Railway - FastRuby.io | Rails Upgrade Service #ruby #rubydeveloper #rubyonrails #Migrating #Rails #Heroku #Railway #FastRuby.io #Rails #Upgrade #Service #heroku #service #upgrade https://rubyonrails.ba/link/migrating-a-rails-app-from-heroku-to-railway-fastruby-io-rails-upgrade-service