The gem can autoload the path only if we know it before initialization, but due to optional path which can be set in an initializer, we can't know the path to autoload.
The line removed do nothing, because the initialization of the application was already be done, and the array autoload_paths was been frozen.
2 solutions:
Explain in readme the need to appendautoload_paths in application.rb with the path frontend/components or the desired path as used in komponent.root.
Use a configuration file yml or json
Append to application.rb when you run rails g komponent:install
Changes to component modules are not autoloaded.
The gem can autoload the path only if we know it before initialization, but due to optional path which can be set in an initializer, we can't know the path to autoload.
The line removed do nothing, because the initialization of the application was already be done, and the array
autoload_paths
was been frozen.2 solutions:
autoload_paths
inapplication.rb
with the pathfrontend/components
or the desired path as used inkomponent.root
.yml
orjson
application.rb
when you runrails g komponent:install
closes #58