A copy of xxx has been removed from the module tree but is still active
Tenant is sort of a red herring – the error would occur if you referenced any bit of app that needs to be loaded by rails’ const_missing trick. The problem is that you are taking something reloadable (your module) and then including it in something not reloadable (ActiveRecord::Base or, in your earlier example ActionMailer::Base). At … Read more