Creating Mountable Engines
summary
Explains how to build mountable engines for Rails 3/4 with concrete commands and files: generator output, engine.rb configuration, the mount method for routes, migrations namespaced and copied into apps via rake, middleware and initializer hooks, and packaging JS/CSS via the asset pipeline. Describes an actual BrowserCMS conversion experience, installer generators, and practical pitfalls: dependency/version conflicts, fragmented auth solutions, and mismatched UIs, so expect actionable patterns and upgrade tradeoffs.
AI-written summary · about
chapters (41)
- 0:00Intro
- 1:52Problem: Repeating yourself is easy
- 2:32Start with a library
- 2:57Plugins are dead
- 3:30Generated code makes upgrades costly
- 4:18Engines are the solution
- 4:32Agenda
- 4:52Evolving a CMS with engines
- 6:27What are engines?
- 7:14Separation of concerns
- 7:48E-commerce
- 8:13Authentication
- 8:34Admin dashboards
- 9:35Creating an engine
- 10:50Add a resource
- 11:12The expected controller
- 11:24An isolated controller
- 11:40Defining an isolated namespace
- 12:42Engine routes
- 13:04Calling resources
- 13:37Mounting the engine
- 14:05Route helpers
- 14:59Getting smart about your routes
- 15:21A view from inside the engine
- 16:55Namespaced tables
- 17:28Out of the gem into the project
- 18:36Installing migrations for all engines
- 19:53Initializers
- 20:34Extending rails behavior
- 21:34Middleware stack
- 22:58Make your engine configurable
- 24:22Overriding default configuration
- 24:53Write a README
- 25:37Improve installation
- 28:39My favorite key
- 30:31The Holy Grail for engine ecosystem
- 30:50Challenges on our quest
- 31:08A. Incompatible dependencies
- 31:37Managing your engine dependencies
- 32:47B. No common security model
- 35:58Reduce errors from duplication








