Install a particular Ruby version using chef-run

允我心安 提交于 2019-12-11 19:06:40

问题


I have been trying to install a particular (latest) version of Ruby using Chef Workstation and its included chef-run CLI.

This is the recipe I'm using for Ruby:

package 'ruby' do
  version '2.5.3'
  action :install
end

Which, running with the command line

chef-run -i /path-to/private_key user@host ruby.rb

Produces the not very helpful message:

[✔] Packaging cookbook... done!
[✔] Generating local policyfile... exporting... done!
[✖] Applying ruby from ruby.rb to target.
└── [✖] [127.0.0.1] Failed to converge ruby.

The converge of the remote host failed for the
following reason:

  Expected process to exit with [0], but received '100'

I have tried to run it with the -V flag, or look for a log file, but I can't seem to find it. Any idea?


回答1:


raise the log_level by setting it to debug in the chef-workstation configuration

$ cat ~/.chef-workstation/config.toml

[log]
level="debug"


来源:https://stackoverflow.com/questions/53583280/install-a-particular-ruby-version-using-chef-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!