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. .
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle