Open cjmling opened 4 years ago
Use chef exec ruby -c <file>
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
ruby --version will print version of ruby installed globally chef exec ruby -v will print version of ruby embedded within chefdk
ruby --version
chef exec ruby -v
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