Omen,
It looks like you've installed the gem into the agent's gem path
instead of the server's. Puppetserver's docs[1] have details on how to
install a gem for puppetserver.
However, ruby-ldap is a compiled gem that won't work with jruby, so
jruby-ldap is the gem you'd want to use on the server. But, jruby-ldap
has a few issues[2], so even then it might not work. The bug I've
linked is about the LDAP terminus, so if you're writing a custom
function using ldap, it may work. jruby-ldap should have the same
interface as ruby-ldap, so it should just drop in and work.
If jruby-ldap doesn't work for you, there is a pure ruby ldap library
called ruby-net-ldap[3]. It looks like it has a different interface
than ruby-ldap, so it would probably require some rewriting of your
function.
[1] -
https://docs.puppetlabs.com/puppetserver/2.1/gems.html#installing-and-removing-gems
[2] -
https://tickets.puppetlabs.com/browse/SERVER-711
[3] -
https://github.com/ruby-ldap/ruby-net-ldap
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/20150717011546.GB10028%40descolada.ucdavis.edu.
> For more options, visit
https://groups.google.com/d/optout.
--
Matthaus Owens
Puppet Labs
PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Bird discount —save $249!