- From: Indra k <
>
- To: "
" <
>
- Subject: [chef] Re: Re: Re:
- Date: Sat, 11 Oct 2014 14:45:55 +0800
Hi Daniel,
my chef server version 11.4.4 not 11.14.4 , i didnot modify anything for ur kind reference here is my error and attached a cookbook
Generated at 2014-09-30 07:45:14 +0100
NoMethodError: undefined method `helpers' for Chef::Resource::Template
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/resource.rb:282:in `method_missing'
/var/chef-solo/cookbooks/mongodb/definitions/mongodb.rb:147:in `block (2 levels) in from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:71:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:71:in `method_missing'
/var/chef-solo/cookbooks/mongodb/definitions/mongodb.rb:139:in `block in from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:48:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/dsl/recipe.rb:48:in `method_missing'
/var/chef-solo/cookbooks/mongodb/recipes/default.rb:39:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/cookbook_version.rb:346:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:151:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:139:in `block in compile_recipes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:137:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:137:in `compile_recipes'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context/cookbook_compiler.rb:74:in `compile'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/run_context.rb:86:in `load'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:224:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:467:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/client.rb:200:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:190:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:239:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in
`loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/solo.rb:231:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/lib/chef/application.rb:73:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.4.4/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:23:in `load'
/usr/bin/chef-solo:23:in `<main>'
From: Daniel DeLeo <
>
To: Indra k <
>
Cc: Jens Skott <
>; "
" <
>
Sent: Saturday, 11 October 2014 12:14 AM
Subject: [chef] Re: Re:
On Friday, October 10, 2014 at 1:53 AM, Indra k wrote:
> I already added that module but still
it shows like this:
>
> ERROR: Exception handlers complete
> [2014-09-26T10:45:35+01:00] FATAL: Stacktrace dumped to /var/chef-solo/cache/chef-stacktrace.out
> [2014-09-26T10:45:35+01:00] FATAL: NoMethodError: undefined method `helpers' for Chef::Resource::Template
> ~
> So that only i disable that module and run it.
>
> Thanks,
> indra
Have you modified anything else? Does this reproduce with a simple example, like a recipe with just one template resource using the `helpers’ function?
From your stack trace, it looks like you’re using 11.14.4, which has the method `helpers’ defined here:
https://github.com/opscode/chef/blob/11.14.4/lib/chef/resource/template.rb#L169 (the feature was added in 11.0.0). I don’t recall any prior bug reports about this feature not working so you must have some unique set of conditions causing this to not work. In any case, the cookbook you’re using depends on this functionality so it won’t work if you comment that line.
--
Daniel DeLeo
Attachment:
mongodb.tar
Description: Unix tar archive
- [chef], Indra k, 10/09/2014
- <Possible follow-up(s)>
- [chef], Indra k, 10/15/2014
Archive powered by MHonArc 2.6.16.