puppet 4 - How do you install a gem into system ruby?
I'm converting my environment to puppet 4.2 and noticed that I had failures because puppet is trying to install a gem into the AIO ruby that's included with puppet vs installing into my system ruby.
2015-10-17 17:37:19 -0700 Puppet (err): Execution of '/opt/puppetlabs/puppet/bin/gem install --no-rdoc --no-ri sensu-plugin' returned 2: ERROR: Could not find a valid gem 'sensu-plugin' (>= 0), here is why: Unable to download data from https://rubygems.org/ - Errno::ECONNREFUSED: Connection refused - connect(2) for "api.rubygems.org" port 443 (https://api.rubygems.org/latest_specs.4.8.gz)
The failure is expected because this system can't access the internet and we have a local rubygems mirror that the system ruby gem is configured to use.
That being said, what do I need to do to get the puppet 4 agent (v1.2.4) to use the system ruby when installing a gem?