The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #3947

puppet executable does not load all ruby files from modulepath/MODULENAME/lib

Added by Dan Bode almost 6 years ago. Updated over 3 years ago.

Status:DuplicateStart date:06/06/2010
Priority:NormalDue date:
Assignee:Dan Bode% Done:


Target version:3.1.0
Affected Puppet version:0.25.4 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


I would like to package utility classes together with provider code.


where util/ec2.rb is a module that I would like to mix-in to my provider.

require 'puppet/util/ec2'
Puppet::Type.type(:ec2).provide(:ec2) do
  include Puppet::Util::Ec2

util/ec2.rb is not found by puppet.

danbode$ puppet ec2.pp 
Could not autoload "/Users/danbode/git/modules/ec2/lib/puppet/provider/ec2/ec2.rb": no such file to load -- puppet/util/ec2

When I specify rubylib, then it works

danbode$ export RUBYLIB=/Users/danbode/git/modules/ec2/lib/
danbode$ puppet ec2.pp

Related issues

Related to Puppet - Bug #14073: puppet apply cannot find types in modules on Windows Duplicate 04/18/2012
Related to Puppet - Bug #9827: Hooks for dependent settings not called Accepted 09/29/2011 10/05/2011
Related to Puppet - Bug #16651: Installing the cloud provisioner module breaks the node s... Duplicate 10/01/2012
Duplicates Puppet - Bug #7316: puppet face applications (subcommands) delivered via modu... Closed 05/02/2011


#1 Updated by James Turnbull almost 6 years ago

  • Category set to plumbing
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Luke Kanies

#2 Updated by Luke Kanies almost 6 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Luke Kanies)
  • Target version set to 2.7.x

I thought this already worked, but I guess it would require hacking the ruby require, or adding every module lib path to Ruby’s LOADPATH.

#3 Updated by Ben Hughes about 5 years ago

Hello, I am going through old Puppet tickets and this one has been dormant for a long time. If this is still an issue please let us know and/or re-open the ticket please. Thanks.

This still an issue? Seeing as we’ve moved on from 0.25.x

#4 Updated by Anonymous over 3 years ago

  • Status changed from Accepted to Duplicate

I’m making this as a duplicate of #4248. I know this was reported earlier, but #4248 seems to be much more widely cited and referred to.

#5 Updated by Anonymous over 3 years ago

  • Status changed from Duplicate to Accepted

Un-marking this as a duplicate.

In Telly, since we support loading faces located in modulepath/foomodule/lib/puppet/ and we do not support loading faces located in the pluginsync lib directory, this ticket is no longer a duplicate.

#6 Updated by Anonymous over 3 years ago

  • Target version changed from 2.7.x to 3.x

#7 Updated by Chris Price over 3 years ago

I think that there are some commits in that would fix this.

#8 Updated by Anonymous over 3 years ago

  • Status changed from Accepted to Needs More Information
  • Assignee set to Dan Bode

Dan, is this still an issue? As described it is about providers being able to load utility code. Puppet 3 changed how files are pluginsynced in a manner that should allow this to work.

#9 Updated by Josh Cooper over 3 years ago

  • Target version changed from 3.x to 3.1.0

To follow up on Andy’s comment, when running puppet agent, the libdir will be in the $LOAD_PATH, so Kernel.require will be able to load utility code (specified as a relative path) from your pluginsync'ed module. In the case of puppet apply (and everything else, but master), the environment-specific modulepath will be added to the $LOAD_PATH, so again you should be able to load utility code. Most likely we can close this as a dup of #7316.

#10 Updated by Josh Cooper over 3 years ago

  • Status changed from Needs More Information to Duplicate

Verified with Dan that running puppet apply with a module whose provider loads utility code is working as expected now that #7316 is fixed (the modulepath is added to $LOAD_PATH).

There could still be issues if the master loads a type and the type requires utility code. That part is #12173 and requires changes to the master to support loading code from multiple environments into the same ruby runtime.

So closing this as a duplicate of #7316 (really it should be the other way around, but #7316 has more information.

Also available in: Atom PDF