- From: "Oliver Rojo" <
>
- To:
- Subject: [chef] Re: Re: Re: undefined method `[]' for nil:NilClass
- Date: Thu, 18 Feb 2010 09:04:53 +0000
By the way, on the default recipe script, I defined the variable this way:
variables(:localhost => localhost, :hosts => hosts)
and calling it on the templates:
localip <%= @localhost["ipaddress"] %>
----- Original Message -----
From: Oliver Rojo
[mailto:
To:
Sent: Thu, 18 Feb
2010 08:56:17 +0000
Subject: [chef] Re: Re: undefined method `[]' for
nil:NilClass
>
>
----- Original Message -----
>
From: Alex Soto
>
[mailto:
>
To:
>
>
Sent: Thu, 18 Feb 2010
>
08:45:31 +0000
>
Subject: [chef] Re: undefined method `[]' for nil:NilClass
>
>
>
> @node is how to get node attributes unless you defined a variable named
>
> localhost.
>
>
Tried changing @localhost to @node but the same error still exists.
>
>
>
> On Feb 18, 2010, at 12:37 AM, Oliver Rojo wrote:
>
>
>
> > How can i fix this error?
>
> >
>
> > Chef::Mixin::Template::TemplateError (undefined method `[]' for
>
> nil:NilClass)
>
> >
>
> > I'm using:
>
> >
>
> > <%= @localhost["ipaddress"] %> on one of my template and suddenly after
>
> running chef-client, it stops with the above error.
>
> >
>
> > Please help!
>
> >
>
> > Oliver
>
>
>
>
>
- [chef] Re: Re: Re: undefined method `[]' for nil:NilClass, Oliver Rojo, 02/18/2010
Archive powered by MHonArc 2.6.16.