Setting Up CI for a Multi-Database Rails App When One DB Is Read-Only

🚨 The Problem Everything worked fine locally—but CI kept failing. I was working on a Rails application that used two databases: A primary database (fully controlled by the app) A secondary database (owned by a different application) Here’s the catch: 👉 The secondary database was read-only from my app’s perspective. Locally, this wasn’t an issue because the database already existed and had the expected schema. But in CI: The secondary database didn’t exist Rails tried to interact with it like a normal DB Tests failed with missing tables and connection errors 🔍 Root Cause The issue came down to this: ...

December 19, 2025 Â· 3 min Â· Mausam Pun