- From: "Mark H. Nichols" <
>
- To: "
" <
>
- Subject: [chef] Re: Error running application_java
- Date: Thu, 12 Dec 2013 16:17:13 -0600
-- mark nichols | (t|a.n) @zanshin | (w) zanshin.net | (gpg key) 53445200
On Dec 12, 2013, at 3:39 PM, Noah Kantrowitz <
">
> wrote: How sure are you of that?
Good question. I created a cookbook using `berks cookbook` and I’m testing the new recipe through Vagrant. Maybe the Chef environment isn’t 11.x as a result of my method. The VM isn’t coming up, so I can’t see what Chef looks like there. I’m new to all of this, so I’m stumbling around in the dark trying to figure out what’s what.
— Mark
That module was added in Chef 11 and is definitely present in 11.8.0 (https://github.com/opscode/chef/blob/11.8.0/lib/chef/dsl/include_recipe.rb#L23) so usually that error stems from using Chef 10.x :-/
--Noah
On Dec 12, 2013, at 1:36 PM, "Mark H. Nichols" <
">
> wrote:
On Dec 12, 2013, at 3:03 PM, Noah Kantrowitz <
">
> wrote:
What version of Chef are you using?
11.8.0
— Mark
--Noah
On Dec 12, 2013, at 12:40 PM, "Mark H. Nichols" <
">
> wrote:
Good afternoon,
I am trying to deploy a Tomcat application using the application_java cookbook. I am getting the following error:
================================================================================ Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_java/providers/java_webapp.rb ================================================================================
NameError --------- uninitialized constant Chef::DSL
Cookbook Trace: --------------- /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_java/providers/java_webapp.rb:20:in `class_from_file'
Relevant File Content: ---------------------- /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application_java/providers/java_webapp.rb:
1: # 2: # Cookbook Name:: application_java 3: # Provider:: java_webapp 4: # 5: # Copyright 2012, ZephirWorks 6: # 7: # Licensed under the Apache License, Version 2.0 (the "License"); 8: # you may not use this file except in compliance with the License. 9: # You may obtain a copy of the License at
[2013-12-12T20:30:31+00:00] ERROR: Running exception handlers [2013-12-12T20:30:31+00:00] ERROR: Exception handlers complete [2013-12-12T20:30:32+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2013-12-12T20:30:32+00:00] FATAL: NameError: uninitialized constant Chef::DSL
Here is my recipe:
include_recipe "application_java"
application 'credit-card-webapp' do path '/usr/local/creditcardapp' repository 'http://tools.ome.ksu.edu/artifactory/ome-telecom-release/telecom/credit-card-webapp/2.1.0/credit-card-webapp-2.1.0.war' scm_provider Chef::Provider::RemoteFile::Deploy
end
tomcat end
Doing a Google search seems to point to the cookbook trying to protect against changes introduced in Chef 11, but I’m not convinced that’s the case here. (http://lists.opscode.com/sympa/arc/chef/2013-06/msg00078.html). Any suggestions would be welcome.
Thanks, Mark
|
Attachment:
signature.asc
Description: Message signed with OpenPGP using GPGMail
Archive powered by MHonArc 2.6.16.