Karolis Pabijanskas
2014-Sep-17 13:48 UTC
[Puppet Users] Reloading missing gems in a custom provider during the run
Hi, I have a custom type and provider that are depending on a rest-client gem. After the pluginsync, when providers get loaded, I do this to avoid it failing: 30 begin 31 require 'rest-client' 32 rescue LoadError => e 33 Puppet.info "You need the `rest-client` gem for this to work." 34 end The rest-client is not present before the run, thus I get an Info message: "Info: You need the `rest-client` gem for this to work." The rest-client gem is then installed before the code that uses this type is run, but the actual provider still thinks the rest-client is not present (as it was loaded without it), thus it fails to run. Is there any way to force puppet to reload the provider before the associated custom type is run, or anything else I can do? Thanks! Karolis -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CANYNSSLzAertneJE%2B7r0-cC13CmX17p5OZQvTTFXOZyx_zDmcg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.