Module: Mongrel::Gems

Module | Mongrel::Gems
In: | lib/mongrel/gems.rb lib/mongrel/gems.rb

### Methods

require require

### Public Class methods

require(library, version = nil)

[Source]

        # File lib/mongrel/gems.rb, line 5
     5:       def require(library, version = nil)
     6:         begin
     7:           Kernel.require library
     8:         rescue LoadError, RuntimeError => e
     9:           begin
    10:             # ActiveSupport breaks 'require' by making it always return a true value
    11:             Kernel.require 'rubygems'
    12:             version ? gem(library, version) : gem(library)
    13:             retry
    14:           rescue Gem::LoadError, LoadError, RuntimeError
    15:             # puts "** #{library.inspect} could not be loaded" unless library == "mongrel_experimental"
    16:           end
    17:         end
    18:       end

require(library, version = nil)

[Source]

        # File lib/mongrel/gems.rb, line 5
     5:       def require(library, version = nil)
     6:         begin
     7:           Kernel.require library
     8:         rescue LoadError, RuntimeError => e
     9:           begin
    10:             # ActiveSupport breaks 'require' by making it always return a true value
    11:             Kernel.require 'rubygems'
    12:             version ? gem(library, version) : gem(library)
    13:             retry
    14:           rescue Gem::LoadError, LoadError, RuntimeError
    15:             # puts "** #{library.inspect} could not be loaded" unless library == "mongrel_experimental"
    16:           end
    17:         end
    18:       end

[Validate]