Class Mongrel::Rails::RailsConfigurator
In: lib/mongrel/rails.rb
Parent: Mongrel::Configurator

Creates Rails specific configuration options for people to use instead of the base Configurator.

Methods

Public Instance methods

Creates a single rails handler and returns it so you can add it to a uri. You can actually attach it to as many URIs as you want, but this returns the same RailsHandler for each call.

Requires the following options:

  • :docroot => The public dir to serve from.
  • :environment => Rails environment to use.
  • :cwd => The change to working directory

And understands the following optional settings:

  • :mime => A map of mime types.

Because of how Rails is designed you can only have one installed per Ruby interpreter (talk to them about thread safety). Because of this the first time you call this function it does all the config needed to get your rails working. After that it returns the one handler you‘ve configured. This lets you attach Rails to any URI (and multiple) you want, but still protects you from threads destroying your handler.

Reloads rails. This isn‘t too reliable really, but should work for most minimal reload purposes. Only reliable way it so stop then start the process.

Takes the exact same configuration as Mongrel::Configurator (and actually calls that) but sets up the additional HUP handler to call reload!.

[Validate]