https://ruby-china.org/topics/18373
我在运行那个用 chef 快速部署到 ubuntu 服务器的时候 执行这个命令的话 bundle exec knife solo cookroot@yourserverip
出现了 Recipe Compile Error in /root/chef-solo/cookbooks-3/chef-solo-search/libraries/search.rb
chef_gemtreetop had an error: Zlib::GzipFile::Error: unexpected end of file
/root/chef-solo/cookbooks-3/chef-solo-search/libraries/search.rb:35:in rescue in <top (required)>'
/root/chef-solo/cookbooks-3/chef-solo-search/libraries/search.rb:31:in
'
/root/chef-solo/cookbooks-3/chef-solo-search/libraries/search.rb:
28: $: << File.expand_path("vendor", File.dirname(FILE)) if Chef::VERSION.to_i >= 11
29:
30: # Ensure the treetop gem is installed and available
31: begin
32: require 'treetop'
33: rescue LoadError
34: run_context = Chef::RunContext.new(Chef::Node.new, {}, Chef::EventDispatch::Dispatcher.new)
35>> Chef::Resource::ChefGem.new("treetop", run_context).run_action(:install)
36: end
37:
38: require 'search/overrides'
39: require 'search/parser'
40:
41: module Search; class Helper; end; end
42:
43: # The search and data_bag related methods moved form Chef::Mixin::Language
44: # to Chef::DSL::DataQuery
in Chef 11.
Running handlers: [2014-06-11T19:07:35+08:00] ERROR: Running exception handlers Running handlers complete
[2014-06-11T19:07:35+08:00] ERROR: Exception handlers complete [2014-06-11T19:07:35+08:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out Chef Client failed. 0 resources updated in 1.989882241 seconds [2014-06-11T19:07:35+08:00] ERROR: chef_gemtreetop had an error: Zlib::GzipFile::Error: unexpected end of file [2014-06-11T19:07:35+08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) ERROR: RuntimeError: chef-solo failed. See output above.
这书的例子是不是有问题?