I think this is isolated to when the rails application is using an engine, but it may be more broad than that. The error:
LoadError (Expected app/controllers/application_controller.rb to define ApplicationController):
app/controllers/application_controller.rb:1:in `<top (required)>'
app/controllers/audits_controller.rb:1:in `<top (required)>'
class ApplicationController < MyEngine::ApplicationController
When I change it to extend from ActionController::Base things work just fine. I imagine this has to do with the load order for fozzie vs my engine?
When I dont include the fozzie gem, things work fine. I have tested on all published versions of fozzie as well as checking out master.
If this issue is specific to Fozzie and Rails integration, the Fozzie Rails is the better place for this to live.
If you want to use the Fozzie Rails functionality in your Rails application, there is no need to change the Controller inheritance, you just need to add:
to your Gemfile and bundle, the middleware functionality is automatically loaded via Railtie.
If I have misunderstood your issue, please reply with some more details on how you have setup your app.
Yes, I saw the fozzie_rails and I get the same error when I use that instead. I was trying to debug the issue a bit. The rails version just adds a railtie to automate the middleware setup. So I dont think any code in the fozzie_rails repo is causing this behavior. That is why I opened it here.
The actual problem is a little different. I am not attempting to change my inheritance when I use this gem. When I add the gem, no other code changes, I get the error above. Looking into the issue a bit more, I was able to isolate the problem to controllers that extended classes from my engine.
I've tracked this down to the facets gem. When I remove that from a checkout of fozzie, everything works great.
I thought it might be related to rubyworks/facets#55 which is not included in their latest version (2.9.3). So I checkout facets from master and build, but I end up with another bug: rubyworks/facets#71
Long story short, I dont think this bug is related to fozzie... Thanks anyway!
Any further progress or changes here? I'm running into a similar problem with loading via unicorn, though Rack/pow locally work fine:
OK, the piecemeal (pre)loading trick worked for me, but is fragile in that I need to keep it updated if fozzie has new facets requirements.
It's fixed, new versions have been pushed to rubygems.
Thanks for the report and apologies for huge delay.