Fixing Rails' Blind Spot: Modular Monoliths and the Missing Tool

This title was summarized by AI from the post below.

I love Rails. I've built my wealth on it. That's exactly why I think we need to have an honest conversation about its biggest blind spot. Eileen M. U. gave a brilliant talk at Rails World last year: "The Myth of the Modular Monolith." After 6 years of modularizing Shopify's monolith, she concluded: "You can't solve human and cultural problems by changing your architecture." She's right kinda of about the culture part. But stopped one step short. Rails doesn't just allow tight coupling. It incentivizes it. ActiveRecord makes every model globally accessible from anywhere. Any controller, any model, any job can reach into any table through any association chain. There's no boundary enforcement. No import restriction. No compilation step that says "this module shouldn't know about that one." When your framework makes coupling the path of least resistance, blaming developers for coupled code is like blaming water for flowing downhill. Shopify tried to fix this with Packwerk. It just give you a map not a real solution. Rails Engines? Been there, done that. They are miniature apps that provide functionality to their host applications. They don't enforce real isolation and they weren't designed for progressive extraction. But this isn't a Rails problem. It's a missing tool problem. Look at what Nx did for the Node/TypeScript ecosystem: → Module boundaries enforced at the import level, not via YAML to-do lists → Dependency graph visualization built in → Affected-only CI: only test what actually changed → Clear public API per module, everything else is private by default → A real path from monorepo module to extracted service Nx didn't replace Node. It gave Node developers the guardrails to build modular systems naturally. The right thing became the easy thing. By default. Rails deserves the same. Imagine a Rails-native tool that: • Enforces module boundaries through autoload paths, not opt-in linting • Gives each module a public API (explicit exports) while keeping internals private • Generates a live dependency graph from actual code usage, not manual YAML declarations • Runs affected-only CI based on that graph Not a replacement for Rails. A companion that makes Rails' conventions work at scale. Eileen is right: culture matters. Education matters. Leadership incentives matter. But culture alone didn't give us CI/CD. Tools did. Culture alone didn't give us code formatting standards. Linters did. Culture alone won't give us modular Rails applications. Rails gave us developer happiness for building products. Now we need the same philosophy applied to building organizations of code. The myth isn't the modular monolith. The myth is that we have the right tools for one. Who's building this? 🎥 Eileen Uchitelle — "The Myth of the Modular Monolith" (Rails World 2024) https://lnkd.in/dabvzHQm

To view or add a comment, sign in

Explore content categories