新手问题 关于 “Rails 程序部署之道” 这本书的问题,这本书的例子是不是有错?

wcc526 · 2014年06月11日 · 最后由 wcc526 回复于 2014年06月12日 · 2457 次阅读

https://ruby-china.org/topics/18373

我在运行那个用 chef 快速部署到 ubuntu 服务器的时候 执行这个命令的话 bundle exec knife solo [email protected]

出现了 Recipe Compile Error in /root/chef-solo/cookbooks-3/chef-solo-search/libraries/search.rb

Zlib::GzipFile::Error

chef_gemtreetop had an error: Zlib::GzipFile::Error: unexpected end of file

Cookbook Trace:

/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'

Relevant File Content:

/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.

这书的例子是不是有问题?

zlib 错误?试过部署几次都错么?

#1 楼 @xixilive 试了好几遍,有人试过部署过书上的例子吗?

需要 登录 后方可回复, 如果你还没有账号请 注册新账号