I noticed that when creating a plugin, if I add a lib folder and some files in this lib folder then I can use
require because it is added to the $LOAD_PATH.
For instance the
docker_manager plugin has a
lib/docker_manager/git_repo.rb file . Then running the rails console
rails c I can write
I am curious to know how discourse makes all this paths available ?
I noticed that in the file
/lib/plugin/instance.rb if I comment line 671
self.instance_eval File.read(path), path then the require does not work. However I don’t understand how instance_eval would add directories to the