def load_needed_dependencies!
      spec_version = WINRM_FS_SPEC_VERSION.dup
      logger.debug('winrm-fs requested,' \
        " loading WinRM::FS gem (#{spec_version})")
      gem 'winrm-fs', spec_version
      first_load = require 'winrm-fs'
      load_winrm_transport!

      if first_load
        logger.debug('WinRM::FS library loaded')
      else
        logger.debug('WinRM::FS previously loaded')
      end
    rescue LoadError => e
      logger.fatal(
        "The `winrm-fs' gem is missing and must" \
        ' be installed or cannot be properly activated. Run' \
        " `gem install winrm-fs --version '#{spec_version}'`" \
        ' or add the following to your Gemfile if you are using Bundler:' \
        " `gem 'winrm-fs', '#{spec_version}'`.",
      )
      raise Train::UserError,
            "Could not load or activate WinRM::FS (#{e.message})"
    end
def load_needed_dependencies!
      spec_version = WINRM_FS_SPEC_VERSION.dup
      logger.debug('winrm-fs requested,' \
        " loading WinRM::FS gem (#{spec_version})")
      gem 'winrm-fs', spec_version
      first_load = require 'winrm-fs'
      load_winrm_transport!

      if first_load
        logger.debug('WinRM::FS library loaded')
      else
        logger.debug('WinRM::FS previously loaded')
      end
    rescue LoadError => e
      logger.fatal(
        "The `winrm-fs' gem is missing and must" \
        ' be installed or cannot be properly activated. Run' \
        " `gem install winrm-fs --version '#{spec_version}'`" \
        ' or add the following to your Gemfile if you are using Bundler:' \
        " `gem 'winrm-fs', '#{spec_version}'`.",
      )
      raise Train::UserError,
            "Could not load or activate WinRM::FS (#{e.message})"
    end
(see Base#load_needed_dependencies!)