Issue #3947 has been updated by Josh Cooper.

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.
----------------------------------------
Bug #3947: puppet executable does not load all ruby files from 
modulepath/MODULENAME/lib
https://projects.puppetlabs.com/issues/3947#change-78746

Author: Dan Bode
Status: Needs More Information
Priority: Normal
Assignee: Dan Bode
Category: plumbing
Target version: 3.1.0
Affected Puppet version: 0.25.4
Keywords: 
Branch: 


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

<pre>
features/aws.rb
provider/ec2/ec2.rb
type/ec2.rb
util/ec2.rb
</pre>

where util/ec2.rb is a module that I would like to mix-in to my provider. 
<pre>
require 'puppet/util/ec2'
Puppet::Type.type(:ec2).provide(:ec2) do
  include Puppet::Util::Ec2
...
</pre>

util/ec2.rb is not found by puppet.

<pre>
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
</pre>

When I specify rubylib, then it works

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


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to