[chef] dhcp cookbook error: FATAL: NameError: uninitialized constant Chef::DSL


Chronological Thread 
  • From: Vladimir Skubriev < >
  • To:
  • Subject: [chef] dhcp cookbook error: FATAL: NameError: uninitialized constant Chef::DSL
  • Date: Thu, 06 Jun 2013 17:48:37 +0400

I installed depends for this cookbook http://community.opscode.com/cookbooks/dhcp

And succefully upload it to the server

When I run chef-client on client. I got an error:

Recipe Compile Error in /var/chef/cache/cookbooks/dhcp/libraries/failover.rb
================================================================================

NameError
---------
uninitialized constant Chef::DSL

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/dhcp/libraries/failover.rb:8:in `singletonclass'
  /var/chef/cache/cookbooks/dhcp/libraries/failover.rb:4:in `<module:Failover>'
  /var/chef/cache/cookbooks/dhcp/libraries/failover.rb:3:in `<module:DHCP>'
  /var/chef/cache/cookbooks/dhcp/libraries/failover.rb:2:in `<top (required)>'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/dhcp/libraries/failover.rb:

  1: 
  2:  module DHCP
  3:    module Failover
  4:      class << self
  5:        if  Chef::Version.new(Chef::VERSION) <= Chef::Version.new( "10.16.2" )
  6:          include Chef::Mixin::Language
  7:        else
  8>>         include Chef::DSL::DataQuery
  9:        end
 10: 
 11:        attr :node
 12:        def load(node)
 13:          @node = node
 14:        end
 15: 
 16:        def enabled?
 17:          if role == "primary"

[2013-06-06T17:34:03+04:00] ERROR: Running exception handlers
[2013-06-06T17:34:03+04:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2013-06-06T17:34:03+04:00] ERROR: Exception handlers complete
[2013-06-06T17:34:03+04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-06-06T17:34:03+04:00] FATAL: NameError: uninitialized constant Chef::DSL

What I must install for normal work ?

Thak you very much!
-- 
Best regards,

CVision Lab System Administrator
Vladmir Skubriev



Archive powered by MHonArc 2.6.16.

§