My best guess is that modulepath is not configured to the correct location.

After you run parse_config, see what Puppet[:modulepath] returns (it needs
to maps to the path that contains the directory with your lib dir in it).
    ie: <module_path>/fake_module/lib

parse_config should load the default settings for Puppet which is either
/etc/puppet/modules or whatever you set in puppet.conf




On Thu, Jul 10, 2014 at 5:43 PM, Michael Legleux <legl...@gmail.com> wrote:

> Using puppet 3.62
>
> Trying to follow along with the book
> At one point (beginning of ch. 3), it says using irb:
>
> >> require 'puppet'
> >> Puppet::Type.type(:package)
> => Puppet::Type::Package
> My output is identical
> However the next bit diverges...
>
> >> require 'puppet'
> >> Puppet.parse_config
> >> Puppet::Type.type(:custom_package).provide(:apt)
> => Puppet::Type::Custom_package::ProviderApt
>
> Puppet.parse_config returns "notice"
> and
> Puppet::Type.type(:custom_package).provide(:apt)  does not return
> Puppet::Type::Custom_package::ProviderApt as
> Puppet::Type.type(:custom_package) is returning nil.
>
> my tree is identical to the books (save for the rpm and yum providers)
> .
> └── lib
>     └── puppet
>         ├── provider
>         │   └── custom_package
>         │       └── apt.rb
>         └── type
>             └── custom_package.rb
>
> Is this book still 100% relevant or are parts achieving obsolescence?
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/00ab0833-4bd1-4939-a710-6223eb7e122b%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/00ab0833-4bd1-4939-a710-6223eb7e122b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2B0t2LyBU6kBduYeP9xGS%2BXcCbbsNKzAf2NMRE0_ixF-NZVZqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to