I am testing out the new
puppetserver and finding a problem with referencing a gem installed to the local ruby.
A custom function is installed to /usr/lib/ruby/site_ruby/1.8/pupppet/parser/functions/myfunction.rb. It makes use of the mysql2 gem
module Puppet::Parser::Functions
newfunction(:myfunction, :type => :rvalue) do |args|
require 'mysql2'
...
end
The mysql2 gem is installed to /usr/lib/ruby/gems/1.8/gems/mysql2-0.3.16/lib/mysql2.rb.
When doing a puppet run on a managed node we get the following error.
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: no such file to load -- mysql2
My question is: How make a gem visible to the new puppetserver so it can be used by a custom function?
I should note this set up works fine when running puppetmaster 3.7 instead of the new puppetserver.