Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Unable to set a path when generating admin #854
if I try without this option, generation goes fine.
I think it has something to do with the -r/--root of the admin breaking something and
In cli.rb the --root option is being used to load the config/boot.rb file. If another --root is specified, the load_boot method will require 'padrino-core/support_lite'.
Trouble is that if support_lite is loaded then this line isn't executed which adds the padrino-admin generator into Padrino::Generators.load_paths.
So, adding the --root option changes load paths.
I could see how this was the desired behavior.
Where '--root' points to the padrino project root, but the verbiage is confusing:
Since padrino loads 'light' version of padrino-core if it can't find the path to config/boot.rb
Don't know what the solution is but, this might get someone further in debugging. I'll also take another look when I have some time. but a few things should be cleared up:
what does the --root option point to? The root destination or the app it seems to be used in both ways and interchanged.
A funny note on this issue is that tests didn't catch it because we don't go through the CLI but directly to the generator!
Would this option be there to change the place where the admin is created? I.e., if I'm setting
I'm in the middle of reviewing the admin's generators because I'm refactoring it to generate a namespaced admin and it wouldn't hurt me to correct this behaviour, I just need to know what's expected from it.
I also have some doubts with the usage of the
Padrino release 0.11.4 still has those problems:
Is there any other way to have the admin page elsewhere than