我是一个蟒蛇人,正在努力理解红宝石叠加痕迹。我很感激,如果有人能告诉我一个系统的方法来深入了解导致这样的消息的原因。运行Opscode 11.4。我认为这可能是由于过时的opscode食谱,所以更新方舟到0.0.17 - 最新。但问题仍然存在。我想也许这是另一本食谱的依赖。它是,elasticsearch,但没有指定版本。在任何情况下,这种方法看似猜测工作,但是没有明确的堆栈跟踪问题的底层。采取此类信息的正确方法是什么?
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
答案 0 :(得分:1)
似乎社区网站版本0.0.17与当前版本不同,即使它们具有相同的版本号。从github https://github.com/opscode-cookbooks/ark/commit/b8c4aaf17d6e88aa857af6b2038eb0dba9981c0b安装源代码解决了这个问题。