Module: Mongrel::Gems

### Home Classes Methods

### In Files

- lib/mongrel/gems.rb

### Methods

- ::require

### Files

- CHANGELOG
- COPYING
- LICENSE
- README
- Makefile

### Class/Module Index

Quicksearch

- Mongrel
- Mongrel::CGIWrapper
- Mongrel::Camping
- Mongrel::Camping::CampingHandler
- Mongrel::Command
- Mongrel::Command::Base
- Mongrel::Command::Registry
- Mongrel::Configurator
- Mongrel::Const
- Mongrel::DeflateFilter
- Mongrel::DirHandler
- Mongrel::Error404Handler
- Mongrel::Gems
- Mongrel::HeaderOut
- Mongrel::HttpHandler
- Mongrel::HttpHandlerPlugin
- Mongrel::HttpParams
- Mongrel::HttpParser
- Mongrel::HttpParserError
- Mongrel::HttpRequest
- Mongrel::HttpResponse
- Mongrel::HttpServer
- Mongrel::Rails
- Mongrel::Rails::RailsConfigurator
- Mongrel::Rails::RailsHandler
- Mongrel::RedirectHandler
- Mongrel::StatisticsFilter
- Mongrel::Stats
- Mongrel::StatusHandler
- Mongrel::StopServer
- Mongrel::TimeoutError
- Mongrel::URIClassifier
- Mongrel::URIClassifier::RegistrationError
- Mongrel::URIClassifier::UsageError
- RequestLog
- RequestLog::Access
- RequestLog::Files
- RequestLog::Objects
- RequestLog::Params
- RequestLog::Threads
- IO
- Kernel
- MongrelDbg
- TCPServer

No matching classes.

# Mongrel::Gems

### Public Class Methods

require(library, version = nil) click to toggle source

    # File lib/mongrel/gems.rb, line 5
    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
          Kernel.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

[Validate]

Generated with the Darkfish Rdoc Generator 2.