Installed gem not being found - Error: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- rest-client

asked 2018-08-30 05:51:05 -0500

jaylm gravatar image

Hi,

We have Puppet Enterprise 2017.3.5.

Trying to install a gem using the below code:

package { 'rest-client': ensure => '1.8.0', install_options => ['--config', '/etc/puppetlabs/puppetserver/conf.d/pe-puppet-server.conf'], provider => 'puppetserver_gem', }

when running # puppetserver gem list we can see the gem is installed.

* LOCAL GEMS *

domain_name (0.5.20180417) fast_gettext (1.1.1) gettext (3.2.2) hiera-eyaml (2.1.0) highline (1.6.21) hocon (1.1.3) http-cookie (1.0.3) jar-dependencies (0.2.6) java (0.0.1) jdbc-sqlserver (0.0.2) jruby-openssl (0.9.19 java) json (1.8.0 java) locale (2.1.2) mime-types (2.99.3) netrc (0.11.0) nokogiri (1.8.2 java) rake (10.1.0) rdoc (4.1.2) rest-client (1.8.0)

In our ruby code we have: require 'rest-client'

but when puppet runs, we get: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- rest-client

It seems like when the agent runs, it's trying to find the gems somewhere else. How can we fix this?

Thank you! J

edit retag flag offensive close merge delete