How to install gems for non-default Ruby with Puppet?
The ruby included with RedHat/CentOS-6 is of version 1.8.7, which is too old for many applications. Though simply updating it with a custom-built RPM is possible, my colleagues shy away from the idea and wish to use the rh-ruby22 packages available from the SCL-repo.
That installs ruby-2.2, which is great, but under /opt/rh/rh-ruby22
. I now need to install several gems and would like to, obviously, use Puppet:
package {'example':
ensure => '0.25',
provider => 'gem'
}
Unfortunately, the gem-provider invokes /usr/bin/gem
instead of /opt/rh/rh-ruby22/root/usr/bin/gem
that needs to be invoked. Is there any other way? Thanks!
Do I have to implement my own package-provider, perhaps?