Sha256: 8ae85fba2809b0f57bf653815e0a491786efe3d7b9b3408a89ca1b2750eb28ce

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

module Mongrel
  module Gems
    class << self
    
      def require(library, version = nil)
        begin
          Kernel.require library
        rescue LoadError, RuntimeError => e
          begin 
            # ActiveSupport breaks 'require' by making it always return a true value
            require 'rubygems'
            version ? gem(library, version) : gem(library)
            retry
          rescue Gem::LoadError, LoadError, RuntimeError
            # puts "** #{library.inspect} could not be loaded" unless library == "mongrel_experimental"
          end
        end  
      end
      
    end    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongrel-1.1.1 lib/mongrel/gems.rb