For some whacky reason it has to do with your extension to String:
If I get rid of that, I’m able to get at my controllers.
Basically what I’ve been doing is to load the dev console, test that I can access the controllers (i.e. Account::AccountController), then require the s3/extensions.rb file manually, and then see what happens when I require another namespaced controller (
i.e. Account::ArtistController). With the library as it is, once I require the extensions file I can no longer get at my controllers, and it fails with load_missing_constant throwing “uninitialized constant”. If I get rid of the extension to String, it doesn’t fail anymore and I get get at all of my controllers even after requiring extensions.
So, it doesn’t appear to be your const_missing_from_s3_library function (which is very cool, by the way! I’ll be sure to use that. I don’t think it made it into the docs, did it?), but is instead the underscore function on String.
I believe that it is overriding the underscore extension to string in ActiveSupport::CoreExtensions::String::Inflections#underscore. Since Inflector is used to derive the controller file names for inclusion, I think this is what’s causing the problem.