It sounds like these gems are pretty tightly coupled. While that is generally okay, it may be a code-smell that they really should be sharing the same gem. While the ideal of 'microgems' as you put it is compelling as far as keeping loaded code to a minimum, the fact of the matter is that you can easily minimize the loaded code without (over) splitting gems up to the point where you are in a dev-cycle nightmare. Generally speaking, you can, if you wish, be very specific about the files that are loaded at run time in the gemspec and controlling what gets pulled in the lib/~gemname~.rb file.
It sounds like in your case, gem C is the parent/main gem. You can alternatively have gem C just swallow gems A and B, or go the extension route: where A and B use the main gem's namesspace, much like resque uses for it's plugins: resque-scheduler, resque-retry, resque-pool. Colin On Saturday, June 4, 2016 at 10:33:22 PM UTC-7, Gisborne wrote: > > I'm developing a fairly large collection of what you might call > micro-gems. I've about a dozen now and more to come. > > There doesn't seem to be a way to manage loading these things while I'm in > development that isn't remarkably painful. I can't specify their > interdependencies in the gemspecs, because I can't specify a path in a > gemspec. The only way I can find to make it work is to include the > dependencies in the Gemfiles. But if gems A and B need gem C, I can't just > put C in A's gemfile and expect it to be visible from B. It seems I have to > laboriously provide explicit gem dependency inclusions in every gem. > > This is turning into a maintenance nightmare, and will be worse when I > want to release all this because I've got to go through and empty out all > the dependencies in all the Gemfiles first. > > What am I missing, or is this in fact just something I have to accept? -- -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby --- You received this message because you are subscribed to the Google Groups "SD Ruby" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
