I'm adding a mountable engine to my rails app, which provides a forum-like functionality (i.e. adds questions, answers, comments, etc). Everything works fine in development. In staging/production, however, I get an error when trying to create an answer, specifically a CanCan permission error (though I think that may be a red herring). But it feels like ti might be related to namespacing or name collision?
At any rate, the issue goes away when I set config.cache_classes = false
in my environment configuration file. But that's not an acceptable solution since it really slows things down.
Where do I go from here? How can I figure out which classes needs to be reloaded? What's the conventional way to deal with this problem?
I'm using Rails 3.1.