我是一个 python 人,正在努力理解 ruby 堆栈跟踪。如果有人能告诉我一种系统的方法来深入了解导致此类消息的原因,我将不胜感激。运行操作码 11.4。我认为这可能是由于过时的操作码说明书,所以将 ark 更新到 0.0.17 - 最新的。然而问题依然存在。我想也许这是对另一本食谱的依赖。它是弹性搜索,但是没有指定版本。在任何情况下,这种方法似乎都是猜测工作,但是没有明确的堆栈跟踪来表明底层问题在哪里。处理此类消息的正确方法是什么?
Synchronizing Cookbooks:
- users
- ark
- elasticsearch
- openssl
- sudo
- yum
- ohai
- munin
- bluepill
- runit
- postgresql
- build-essential
- apt
- git
- nginx
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/ark/libraries/resource_ark.rb
================================================================================
NoMethodError
-------------
undefined method `attribute' for Chef::Resource::Ark:Class
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/ark/libraries/resource_ark.rb:37
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/ark/libraries/resource_ark.rb:
30: @allowed_actions.push(:install, :dump, :cherry_pick, :put, :install_with_make, :configure, :setup_py_build, :setup_py_install, :setup_py)
31: @action = :install
32: @provider = Chef::Provider::Ark
33: end
34:
35: attr_accessor :path, :release_file, :prefix_bin, :prefix_root, :home_dir, :extension, :version
36:
37>> attribute :owner, :kind_of => String, :default => 'root'
38: attribute :group, :kind_of => [String, Fixnum], :default => 0
39: attribute :url, :kind_of => String, :required => true
40: attribute :path, :kind_of => String, :default => nil
41: attribute :full_path, :kind_of => String, :default => nil
42: attribute :append_env_path, :kind_of => [TrueClass, FalseClass], :default => false
43: attribute :checksum, :regex => /^[a-zA-Z0-9]{64}$/, :default => nil
44: attribute :has_binaries, :kind_of => Array, :default => []
45: attribute :creates, :kind_of => String, :default => nil
46: attribute :release_file, :kind_of => String, :default => ''
[2013-02-25T00:19:30+00:00] ERROR: Running exception handlers
[2013-02-25T00:19:30+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json
[2013-02-25T00:19:30+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated
[2013-02-25T00:19:30+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-02-25T00:19:30+00:00] FATAL: NoMethodError: undefined method `attribute' for Chef::Resource::Ark:Class