[chef] Re: undefined method `[]' for nil:NilClass


Chronological Thread 
  • From: Alex Soto < >
  • To:
  • Subject: [chef] Re: undefined method `[]' for nil:NilClass
  • Date: Thu, 18 Feb 2010 00:45:31 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-type:message-id :content-transfer-encoding:from:subject:date:to:x-mailer; b=EhLZHLWdJMkHxfyfFy4fi1yJCBLLSyumL72d3XpJ9x+S4tRmEmaeJcwweXy3ok8aJl jOzsdhMiIoWxc0JXCwvY3M38SM2wgqAnq5QdFQ/rezPSznWIfS3WlPXkq2dvZRt3TdF/ Gb0UFOIGlV9pO7GKnFACdoc00T8VmbTQUZvEM=

@node is how to get node attributes unless you defined a variable named 
localhost.

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




Archive powered by MHonArc 2.6.16.

§