azure-chef-extension version 1188.8.131.520 and earlier cannot handle the presence of a system ruby on linux systems.
The most likely cause of this issue during a run like azure-powershell-examples.md is that the system targeted for bootstrap has a system ruby installed. chef-client operates using its own embedded ruby that has nothing to do with system rubies installed by packages. However, the system ruby interacts poorly with the code in this extension, which was written only with the embedded chef-client ruby in mind.
A fix is planned, but until it appears, the best workaround is to uninstall the system ruby from your image.
The azure-chef-extension will install and enable just fine, then you can reinstall your system ruby afterwards, if you prefer.
WARNING: This system ruby installation will again get in the way of any activities undertaken by azure-chef-extension machinery until a fix is made in a later version than above.