Let's say you've added a gem dependency with config.gem, but your gem
isn't installed or Rails doesn't see it. Like the json gem, which one
of our unfortunate Windows developers has installed but Rails doesn't
see. (I hear it's a Windows issue, but I don't use it.)
When you start your mongrel, you get a warning that you're missing
gems. "That's ok. My app has a graceful fallback." Then your app will
throw seemingly random errors. After a bit of troubleshooting, you
learn Rails is skipping your after_initialize block and config/
initializers/*.rb files if it fails to load any gems.
Unless someone can explain the reasoning, I think this is a bug, and
I've made the patch to fix it.
I couldn't find any tests that check the config/initializers/ files
are run, so I've added one.
Looking for feedback.