Issue #5842 has been updated by James Turnbull.

Category changed from plug-ins to Rails


----------------------------------------
Bug #5842: The 'active_record' terminus does not load Rails
https://projects.puppetlabs.com/issues/5842

Author: Luke Kanies
Status: Accepted
Priority: Normal
Assignee: 
Category: Rails
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Apparently its normal usage loads Rails for you, but not if you just try to 
load it directly:
<pre>
$ irb
>> require 'puppet'
=> true
>> Puppet::Indirector::Indirection.instances.each do |ind|
?> klasses = Puppet::Indirector::Terminus.terminus_classes(ind)
>> puts "#{ind}: #{klasses.inspect}"
>> end
Puppet::Error: Could not autoload 
/Users/luke/puppet/lib/puppet/indirector/facts/active_record.rb: uninitialized 
constant Puppet::Rails
        from /Users/luke/puppet/lib/puppet/util/autoload.rb:119:in `loadall'
        from /Users/luke/puppet/lib/puppet/util/autoload.rb:109:in `each'
        from /Users/luke/puppet/lib/puppet/util/autoload.rb:109:in `loadall'
        from /Users/luke/puppet/lib/puppet/util/autoload.rb:108:in `each'
        from /Users/luke/puppet/lib/puppet/util/autoload.rb:108:in `loadall'
        from /Users/luke/puppet/lib/puppet/indirector/terminus.rb:116:in 
`terminus_classes'
        from (irb):3
        from (irb):2:in `each'
        from (irb):2
</pre>

The problem goes away if you manually load 'puppet/rails'.


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