diff --git a/lib/fog/bin.rb b/lib/fog/bin.rb index ca0945109..e06b62f30 100644 --- a/lib/fog/bin.rb +++ b/lib/fog/bin.rb @@ -3,7 +3,9 @@ require 'fog/core/credentials' module Fog class << self def available_providers - @available_providers ||= Fog.providers.values.select {|provider| Kernel.const_get(provider).try(:available?)}.sort + available_providers ||= Fog.providers.values.select do |provider| + Kernel.const_defined?(provider) && Kernel.const_get(provider).try(:available?) + end.sort end def registered_providers