So I seems I was stupid and haven\'t checked running in production-env for a long time, and now that I\'m trying to deploy, I\'m getting this annoying error. Any ideas?
When I've gotten this error, it's because there's an error in an inner class/module that's inside the class/module mentioned in the error.
I can't say if this is a typo or the real code but:
class User < InheritedResources::Base
include HistoryTools
end
Should probably be
class User < ActiveRecord::Base
include HistoryTools
end
InheritedResources should be used for controllers, not models.
You shouldn't have to have the require 'history_tools' in the environment.rb. In that version of Rails all files in the lib folder should be auto-loaded.
ok, after many more hours of digging, it seems it wasn't even related to this stuff at all. It was an error about 3 more classes down the tree, that was failing for another strange reason, and the exception was apparently being caught by the internals of rails somewhere and just ignored.
That doesn't explain why it worked in development mode, unfortunately, but at least all my stuff works now. Thanks anyway!