[chef] Re: Really? What am I missing?


Chronological Thread 
  • From: Warren Bain < >
  • To: " " < >
  • Subject: [chef] Re: Really? What am I missing?
  • Date: Fri, 7 Dec 2012 16:53:06 +1100
  • Accept-language: en-US
  • Acceptlanguage: en-US

Mark,

As a chef n00b I get lots of these. The attribute you are referencing doesn't 
exist and so node[:sgbase] which is nil doesn't have a method [:branch]. 
Hence the slightly confusing error.

Wazza


Warren Bain
http://ninefold.com
Australia's cloud
direct: +61 2 8221 7729
mobile: +61 414 867 559
follow: http://twitter.com/thoughtcroft

Mark J Bradakis 
< >
 wrote:
So I get this error:

NoMethodError
-------------
undefined method `[]' for nil:NilClass


Which comes from this line:

627>>   revision node[:sgbase][:branch]

Called by a recipe in a file that does this:

"cookbook_versions": {
"cpan": "= 1.0.0",
"apt": "= 1.0.0",
"sgbase": "= 1.0.0",
"branch": "= 1.0.0"
     ...


sgbase and branch ARE defined - why the NULL error?


mjb.





Archive powered by MHonArc 2.6.16.

§