Multiple Versions of Gem command Supported?

59 views
Skip to first unread message

Ron

unread,
Aug 10, 2012, 1:20:15 PM8/10/12
to puppet...@googlegroups.com
I have two versions of Ruby on my servers. One that is used for Puppet and system scripts (Ruby 1.8.7) and then one which is a custom package I built running the latest Ruby 1.9.3. This is used for the Ruby/Rails applications that are being developed by our dev team. Is there a way for Puppet to control the gems installed by both of these gem versions? I need a way to spin up systems with no user input, right now thats not possible without this. Is subclassing the gem provider the only way or is there a more clean way to set path with the current gem provider. I was looking in the gem.rb provider source and didn't see a way there.

Thanks,
Ron

Nan Liu

unread,
Aug 10, 2012, 1:27:50 PM8/10/12
to puppet...@googlegroups.com
Yeah, that's the only way I'm aware of. The code is only a few lines,
and we have a pe_gem example:
https://github.com/puppetlabs/puppetlabs-pe_gem

The bigger problem is you can't have duplicate package names, so you
either need to two environments or separate manifests if you wish to
manage the same gems in 1.8.7 and 1.9. There's no way to install in
one puppet run at the moment.

Thanks,

Nan

Ron

unread,
Aug 10, 2012, 1:36:47 PM8/10/12
to puppet...@googlegroups.com
Thanks for the update, I am assuming I need pluginsync in order for this to work properly.
I will test it out, still some limitations with this approach as you stated.

No good way as of yet to handle multiple gem versions. Of course this is a moot point once Puppet 3 is released and linked to Ruby 1.9.3.
Then I will only have a single version of Ruby to manage.

Thanks,
Ron
Reply all
Reply to author
Forward
0 new messages