On Oct 18, 11:43 am, Michael Stahnke <stah...@puppetlabs.com> wrote: > On Tue, Oct 18, 2011 at 6:19 AM, jcbollinger <john.bollin...@stjude.org> > wrote: [...] > > I, on the other hand, would recommend avoiding gems altogether if > > you're using the system's Ruby (i.e. one you installed from an RPM, > > whether via yum or otherwise). Ruby modules installed via RPM are not > > (should not be) gems. Using both gem and rpm to manage the same Ruby > > installation is begging for trouble. > > Why? The packages of many ruby libraries are basically gems wrapped > in RPM. Basically it allows the library/tool to be registered with > the RPM and gem database. I admit it's not my favorite thing to have > gems (and not RPMs), but technically there is almost nothing wrong > with it, other than future RPMs can't depend on something from a gem > install only.
As others have described, if you use gems and RPMs on the same Ruby installation then you have two different sources of truth. They can and will disagree about what modules (to use a somewhat generic term) are installed. Their respective repositories can and will provide different versions of some modules, and different configurations of some other modules. Using both together on the same Ruby installation can and will make a hash of your Ruby library. Eventually. If you're lucky, you'll notice. Even RPMs registering their Ruby payloads with the gem database does not solve the problem, because gem is not so accommodating about synchronizing the RPM database. In any case, it is not safe to assume that *all* RPMs with Ruby payloads will install modules as gems. > There are plenty of other debates about rubygems, and whether or not > they are useful or helpful or anything. But as far as having a system > with ruby and using to gem to install things, it will work and is > always all that bad. Please don't misunderstand: I have no particular complaint about gem itself. If you want all its gemtacular goodness then install a local Ruby build and go wild in it with gems. As long as you put it in a reasonable place (e.g. /usr/local) no RPM will touch it, so no problem. Of course, you have no obligation whatever to do as I advise. If you choose to use both gems and RPMs on the same Ruby then I wish you luck -- you're a braver man than I. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.