    # File lib/mongrel/rails.rb, line 133
          def rails(options={})

            return @rails_handler if @rails_handler

            ops = resolve_defaults(options)

            # fix up some defaults
            ops[:environment] ||= "development"
            ops[:docroot] ||= "public"
            ops[:mime] ||= {}

            $orig_dollar_quote = $".clone
            ENV['RAILS_ENV'] = ops[:environment]
            env_location = "#{ops[:cwd]}/config/environment"
            require env_location
            require 'dispatcher'
            require 'mongrel/rails'

            ActionController::AbstractRequest.relative_url_root = ops[:prefix] if ops[:prefix]

            @rails_handler = RailsHandler.new(ops[:docroot], ops[:mime])
          end