On May 18, 11:04 ¨Âí¬ Øáöéåò Îïò鼿®®®Àèáóèòåæ®ãïí¾ ÷òïôåº > On Tue, May 18, 2010 at 4:43 PM, Intransition <transf... / gmail.com> wrote: > > Considering the examples given in that article, I wonder if it isn't > > getting confused with *optional dependencies*. For example, database > > adapters are generally optional. The article says Rails puts mysql and > > pg in a db group, but why would they not be in their own groups? Why > > would I want both installed in on a production machine to begin with? > > Doesn't make sense to me. > > That's talking about Rails itself. If you are contributing to the > Rails codebase you certainly want to run its test suite. In particular > the suite of Active Record, which involves SQLite, MySQL, and > PostgreSQL. I see. So ActiveRecord's tests are designed to test against these three databases. How are the other adapters tested? Also shouldn't this be part of ActiveRecord's Gemfile? And what if you have only one of these databases on your system, or perhaps I am only concerned with an issue in the mysql adapter. That would indicate a need to select among them. And that makes me wonder how these group selections filter down to their dependencies. I take it the --without selections applies to all of them? > A Rails application has in its generated Gemfile only the adapter of > the database it has been generated for. Ok. That make sense. > On the other hand, if you want to patch the Rails API via docrails, or > are working on guides, you do not need to setup the databases, nor to > install the database adapters. In that case you may tell bundler not > to include that group and you're done. That's a use case for groups. I can see that. But it doesn't seem like a strong case. I mean, is it worth remembering this group just to avoid these two dependencies b/c you only plan to be doing doc work? Might it not just have a mode to ask you which dependencies you want?