<div dir="ltr">> Manuel Morales is going to give a talk called "Scaling beyond
Rails" all about turning a large Rails app into several smaller
services.<br><div><br></div><div>Prompted by this news, I would like to ask: who's using "unbuilt engines" for this purpose (perhaps Manual Morales is?) and what has your experience been?<br><br></div><div>
(Unbuilt engines: creating a rails engine in a subdirectory of your app and keeping the whole lot in the same git/$dvcs repository as the parent to ease deploys and avoid versioning issues. See <a href="http://pivotallabs.com/unbuilt-rails-dependencies-how-to-design-for-loosely-coupled-highly-cohesive-components-within-a-rails-application/">http://pivotallabs.com/unbuilt-rails-dependencies-how-to-design-for-loosely-coupled-highly-cohesive-components-within-a-rails-application/</a> )<br>
</div><div><br></div><div>We've started down that path recently-ish, and one source of friction has been what to do with the Gemfile.lock created in the engine's directory - either you don't check it in and end up developing the engine against different (usually newer) versions of stuff than the main app, or you do check it in then nobody remembers to update it when they change the main app, and then your CI builds fail in non-obvious ways. I know there are really good reasons that *real* gems shouldn't have a Gemfile.lock at all, but the basis of that argument is that real gems get more extensive testing in more environments than an application does, which isn't really the case here when there's only one client of our unbuilt gem: though technically it's a gem, spiritually/philosophically it's more of an application component.<br>
</div><div><br>Anyway, tl;dr One workaround seems to be to do<br><br>$ bundle && bundle exec ruby -e'Bundler::Definition.build("Gemfile","../../Gemfile.lock", {}).lock("Gemfile.lock")'<br>
<br></div><div>in the engine's directory to regenerate Gemfile.lock based on the version dependencies in the main Gemfile. I *think* it works, but whether it's supposed to work or whether it just happens to work I am less sure.<br>
<br></div><div>Anyone run into this and what did you do?<br><br></div><div>-dan<br><br></div></div>