mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
close #15539
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@877 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
parent
2d38b5d25b
commit
c97a9e8bb3
4 changed files with 9 additions and 9 deletions
|
@ -11,6 +11,8 @@ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
|
|||
require 'mongrel'
|
||||
require 'mongrel/rails'
|
||||
|
||||
Mongrel::Gems.require 'gem_plugin'
|
||||
|
||||
# require 'ruby-debug'
|
||||
# Debugger.start
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ require 'stringio'
|
|||
|
||||
require 'mongrel/gems'
|
||||
|
||||
Mongrel::Gems.require 'gem_plugin'
|
||||
Mongrel::Gems.require 'cgi_multipart_eof_fix'
|
||||
Mongrel::Gems.require 'fastthread'
|
||||
require 'thread'
|
||||
|
|
|
@ -65,7 +65,7 @@ module Mongrel
|
|||
REQUEST_URI='REQUEST_URI'.freeze
|
||||
REQUEST_PATH='REQUEST_PATH'.freeze
|
||||
|
||||
MONGREL_VERSION="1.1".freeze
|
||||
MONGREL_VERSION="1.1.1".freeze
|
||||
|
||||
MONGREL_TMP_BASE="mongrel".freeze
|
||||
|
||||
|
|
|
@ -2,19 +2,18 @@ module Mongrel
|
|||
module Gems
|
||||
class << self
|
||||
|
||||
alias :original_require :require
|
||||
|
||||
def require(library, version = nil)
|
||||
begin
|
||||
original_require library
|
||||
Kernel.require library
|
||||
rescue LoadError, RuntimeError => e
|
||||
unless respond_to? 'gem'
|
||||
begin
|
||||
# ActiveSupport breaks 'require' by making it always return a true value
|
||||
require 'rubygems'
|
||||
gem library, version if version
|
||||
retry
|
||||
version ? gem(library, version) : gem(library)
|
||||
retry
|
||||
rescue Gem::LoadError, LoadError, RuntimeError
|
||||
# puts "** #{library.inspect} could not be loaded" unless library == "mongrel_experimental"
|
||||
end
|
||||
# Fail without reraising
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue