Install a particular Ruby version using chef-run

410 views Asked by At

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

There are 1 answers

0
Mr. On

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

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

[log]
level="debug"