- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Custom LWRP Un-initialized Constant error
- Date: Wed, 28 Jan 2015 09:34:45 -0800
On Wednesday, January 28, 2015 at 9:27 AM,
wrote:
>
Good Afternoon/evening/morning,
>
I’m having a little trouble writing a custom LWRP. It’s pretty simple as
>
I’m trying to get my head round how @current_resource works.
>
Here’s the code followed by the error; any ideas what I’m doing wrong?
>
(this LWRP is contained in an library cookbook called AirWatch)
You’re really close. What’s going on here is that Chef prepends the cookbook
name to the LWRP name to generate the class name for the resource. E.g., in
the `java` cookbook there is an `ark` LWRP, which becomes ‘JavaArk’. Based on
your mail, it looks like your resource is in air_watch/resources/test.rb ? In
that case it should be AirWatchTest.
HTH,
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.