def install_gem(name, version=None, install_args=None, override_args=False):
    choc_path = _find_chocolatey(__context__, __salt__)
    cmd = [choc_path, 'gem', name]
    if version:
        cmd.extend(['-Version', version])
    if install_args:
        cmd.extend(['-InstallArguments', install_args])
    if override_args:
        cmd.extend(['-OverrideArguments'])
    cmd.extend(_yes(__context__))
    result = __salt__['cmd.run_all'](cmd, python_shell=False)

    if result['retcode'] != 0:
        err = 'Running chocolatey failed: {0}'.format(result['stderr'])
        log.error(err)
        raise CommandExecutionError(err)

    return result['stdout']
Instructs Chocolatey to install a package via Ruby's Gems.
dataset/ETHPy150Open saltstack/salt/salt/modules/chocolatey.py/install_gem