I have an engine and can access model-classes of the hosting app without any troubles.
But when I try to access classes that are defined in the lib-directory of the hosting app, they are not found and I get a
uninitialized constant Redmine
where Redmine is a module defined in the lib-directory of the hosting app. The lib-directory has added this dir to the autoload_paths, but the engine does not see them. The documentation (Rails::Engine) here is a litte vague:
The Application
class adds a couple more paths to this set. And as in your Application
, all folders under app
are automatically added to the load path. If you have an app/observers
folder for example, it will be added by default.
but the paths defined as autoload_paths are not added by default?!
Is there a way I can get the engine to load the classes in the lib-dir of the hosting app?!
thx for any help,
stefan