cjmling / findings

Notes on stuff i finds worth keeping for quick reference later on.
2 stars 0 forks source link

Chef check ruby syntax #229

Open cjmling opened 4 years ago

cjmling commented 4 years ago

Use chef exec ruby -c <file>

Ruby come embedded with chefdk so we can run and use ruby command. But ruby might not exist globally , so you might not able to run ruby without chefdk.

Learn more tutorial : https://www.udemy.com/course/chef-fundamentals-a-recipe-for-automating-infrastructure/learn/lecture/6245458#questions/8570794

cjmling commented 4 years ago

To check version of ruby

ruby --version will print version of ruby installed globally chef exec ruby -v will print version of ruby embedded within chefdk