I''m working on a system (not created by me, I swear) that has something like 5 different versions of ruby installed, including a couple of versions of jruby. I need to install a gem, but I need to use /opt/jruby/bin/gem (or jgem) to do it. Unfortunately, I can''t see any way to modify puppet''s path to help it find this little "gem" (ha ha). Is path modification like this possible? Is there another/better way to handle this issue? Of course I could use an "exec", but I try to avoid those whenever at all possible since it rather defeats the purpose of using puppet (see http://utcc.utoronto.ca/~cks/space/blog/programming/ConfiguringInRealLanguage ) Thanks. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
No-one has hit this issue? I''m really surprised. -Robin On Fri, Apr 01, 2011 at 02:39:35AM -0700, Robin Lee Powell wrote:> > I''m working on a system (not created by me, I swear) that has > something like 5 different versions of ruby installed, including a > couple of versions of jruby. > > I need to install a gem, but I need to use /opt/jruby/bin/gem (or > jgem) to do it. > > Unfortunately, I can''t see any way to modify puppet''s path to help > it find this little "gem" (ha ha). > > Is path modification like this possible? > > Is there another/better way to handle this issue? > > Of course I could use an "exec", but I try to avoid those whenever > at all possible since it rather defeats the purpose of using puppet > (see > http://utcc.utoronto.ca/~cks/space/blog/programming/ConfiguringInRealLanguage > ) > > Thanks. > > -Robin-- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> -----Original Message----- > From: puppet-users@googlegroups.com [mailto:puppet- > users@googlegroups.com] On Behalf Of Robin Lee Powell > Sent: Friday, April 01, 2011 4:40 AM > To: Puppet Users > Subject: [Puppet Users] gems, ruby installs, and paths > > > I''m working on a system (not created by me, I swear) that has > something like 5 different versions of ruby installed, including a > couple of versions of jruby. > > I need to install a gem, but I need to use /opt/jruby/bin/gem (or > jgem) to do it. > > Unfortunately, I can''t see any way to modify puppet''s path to help > it find this little "gem" (ha ha). > > Is path modification like this possible? > > Is there another/better way to handle this issue? > > Of course I could use an "exec", but I try to avoid those whenever > at all possible since it rather defeats the purpose of using puppet > (see > http://utcc.utoronto.ca/~cks/space/blog/programming/ConfiguringInRealLa > nguage > )In a similar situation (ruby-1.8.x and REE installed on a server), I found that mangling the PATH to point at the appropriate ruby did it. That only works if your entire puppet config (including puppet itself?) works with that ruby, of course. Otherwise, I think the exec is it. Unless someone (one of us?) patches the gem provider to take a PATH? I don''t know if that''s useful for anything other than the sad case of too many rubys (rubies?) being installed at once, or if this is a common problem. -- Bill Weiss Backstop Solutions Group -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Sat, Apr 2, 2011 at 4:29 PM, Bill Weiss <bweiss@backstopsolutions.com> wrote:> In a similar situation (ruby-1.8.x and REE installed on a server), I found that mangling the PATH to point at the appropriate ruby did it. That only works if your entire puppet config (including puppet itself?) works with that ruby, of course. > > Otherwise, I think the exec is it. Unless someone (one of us?) patches the gem provider to take a PATH? I don''t know if that''s useful for anything other than the sad case of too many rubys (rubies?) being installed at once, or if this is a common problem.The gem package provider doesn''t specify a given PATH for the gem command. If you construct your PATH for the puppet process such that the desired gem is found first, that will work, but doesn''t solve the problem some people have with wanting to use several different gem executables within the same puppet run. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
> -----Original Message----- > From: Nigel Kersten [mailto:nigel@puppetlabs.com] > Sent: Saturday, April 02, 2011 7:05 PM > To: puppet-users@googlegroups.com > Cc: Bill Weiss > Subject: Re: [Puppet Users] gems, ruby installs, and paths > > On Sat, Apr 2, 2011 at 4:29 PM, Bill Weiss > <bweiss@backstopsolutions.com> wrote: > > > In a similar situation (ruby-1.8.x and REE installed on a server), I > found that mangling the PATH to point at the appropriate ruby did it. > That only works if your entire puppet config (including puppet > itself?) works with that ruby, of course. > > > > Otherwise, I think the exec is it. Unless someone (one of us?) > patches the gem provider to take a PATH? I don''t know if that''s useful > for anything other than the sad case of too many rubys (rubies?) being > installed at once, or if this is a common problem. > > The gem package provider doesn''t specify a given PATH for the gem > command. > > If you construct your PATH for the puppet process such that the > desired gem is found first, that will work, but doesn''t solve the > problem some people have with wanting to use several different gem > executables within the same puppet run.Right. I meant the OS PATH, not the PATH inside of Puppet. Thanks for the clarification, Nigel. -- Bill Weiss Backstop Solutions Group -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Sat, Apr 02, 2011 at 05:05:18PM -0700, Nigel Kersten wrote:> On Sat, Apr 2, 2011 at 4:29 PM, Bill Weiss > <bweiss@backstopsolutions.com> wrote: > > > In a similar situation (ruby-1.8.x and REE installed on a > > server), I found that mangling the PATH to point at the > > appropriate ruby did it. That only works if your entire puppet > > config (including puppet itself?) works with that ruby, of > > course. > > > > Otherwise, I think the exec is it. Unless someone (one of us?) > > patches the gem provider to take a PATH? I don''t know if that''s > > useful for anything other than the sad case of too many rubys > > (rubies?) being installed at once, or if this is a common > > problem. > > The gem package provider doesn''t specify a given PATH for the gem > command. > > If you construct your PATH for the puppet process such that the > desired gem is found first, that will work,I tried that; the PATH that puppet reported via exec + logoutput + echo was very much not the path that I had set before I ran it. ... I just found this: Exec { path => "/opt/ruby/bin:/usr/bin:/usr/sbin:/bin:/sbin" } So clearly *that* wasn''t a good test. Ah, the joys of adminning something I didn''t set up. Anyways. Ah. The problem, it turns out, has naught to do with paths: "prawn-core" being installed causes a package statement for "prawn" to not activate with the "gem" provider. -_- I''ma call that a "bug" right there (and it''s in the system; http://projects.puppetlabs.com/issues/3127 ; so is the path issue; http://projects.puppetlabs.com/issues/5207 ). Sorry for wasting y''all''s time on the wrong track. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.