We've been bitten by this a couple of times. We've got a different YAML file per environment and the config blocks in the files are namespaced accordingly with "development", "production", etc. If we happen to accidentally pass the development YAML file to the production app, it will open up the YAML file and attempt to find a "production" section that isn't there. Then instead of letting us know what the actual problem is (can't find a "production" section in the YAML file), the initialize() method ignores the fact that the section was missing and proceeds to attempt "self.replace hash" with "hash" being nil.
This tiny update to initialize() will trap for the condition of the missing namespace section and raise an informative exception instead of the somewhat less helpful "can't convert nil into Hash" one we're seeing now.
during initialization, raise an error that indicates that the namespa…
…ce in question is not defined in the YAML file rather than ending up with a nil object that we try to replace self with