public RackRequestHandler(FilterConfig config) {
        log.info("Creating new RubyRequestHandler instance");
        
        // Configure ignore paths
        String pathCfg = config.getInitParameter("ignorePaths");
        if (pathCfg != null) {
            this.ignorePaths = pathCfg.split("\\s+");
        }
        else {
        	ignorePaths = new String[]{"/images", "/stylesheets", "/javascript", "/favicon.ico"};
        }
        
        if (log.isInfoEnabled())
        	for (int x=0; x<ignorePaths.length; x++)
        		log.info(ignorePaths[x] + " is configured as an ignore path.");
         
        // If jruby home is not sepcified for us, try to find it in the environment
        if (config.getInitParameter("JRUBY_HOME") != null)
            JRUBY_HOME = config.getInitParameter("JRUBY_HOME");
        else
            JRUBY_HOME = System.getenv("JRUBY_HOME");
        
        if (JRUBY_HOME == null) {
            final String message = "JRUBY_HOME is not set. This must be " +
                "provided by the envoironment or set as as " +
                "init-parameter in web.inf";
            log.fatal(message);
            throw new RuntimeException(message);
        }
        
        log.info("Using JRUBY_HOME = "+JRUBY_HOME);

        // Try to find the root directory of the ruby web app. If not specified, assume that it
        // is the parent directory of the public root
        if (config.getInitParameter("APP_HOME") != null)
        	APP_HOME = config.getInitParameter("APP_HOME");
        else {
        	File publicRoot = new File(config.getServletContext().getRealPath(PS));
        	APP_HOME =  publicRoot.getParent();
        }
        log.info("Using APP_HOME = "+APP_HOME);
        
        // JRuby Paths
        List<String> loadPath = new ArrayList<String>();        
        loadPath.add(JRUBY_HOME+PS+"lib"+PS+"ruby"+PS+"site_ruby"+PS+RUBY_VERSION);        
        loadPath.add(JRUBY_HOME+PS+"lib"+PS+"ruby"+PS+"site_ruby");        
        loadPath.add(JRUBY_HOME+PS+"lib"+PS+"ruby"+PS+RUBY_VERSION);        
        loadPath.add(JRUBY_HOME+PS+"lib"+PS+"ruby"+PS+RUBY_VERSION+PS+"java");                      
        
        // Set up Ruby Runtime
        this.runtime = JavaEmbedUtils.initialize(loadPath);
        this.runtime.setKCode(UTF8);
        this.runtime.setJRubyHome(JRUBY_HOME);
        this.runtime.setCurrentDirectory(APP_HOME);

        // Instantiate rack adapter
        try {
        	final String framework = config.getInitParameter("framework");
        	rackAdapter = RackAdapterBuilder.getAdaptorForFramework(runtime, framework);
            log.debug("Loaded "+framework+" rack adapter: " + rackAdapter.inspect());
        }
        catch (Exception e) {
            String message = "Can't load rack adapter.";
            log.error(message, e);
            throw new RuntimeException(message, e);
        }              
    }