New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set a path when generating admin #854
Comments
*nix or windows? |
*nix, sorry I forgot to mention that. |
pretty strange it works on my env very well. Can you try with |
Same thing. I'm running Ubuntu Server 12.04 LTS on a VirtualBox machine. |
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. e.g:
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. |
OK, this is a valid issue and question. Moving to 0.11.1 since I want to release imminently. |
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/core-members any thoughts on this? |
I think allowing the root to be changed makes sense. It should generate an admin with another folder name. |
Great @skade, I think that too... I will implement it then. What about |
+1 I ran into this issue too (I modified the app name in the source of padrino to run the generator...) You should implement the app + model options, there only a few line missing from what I can see, it's almost done! |
Padrino release 0.11.4 still has those problems: Is there any other way to have the admin page elsewhere than |
bit better. Also disabled `-a` since it wasn't really doing anything and left a few notes to implement them. Please, see the conversation at: padrino#854 (comment) I don't think this should be a blocker to release 0.11.0 and the rest of the admin needs to get there in time!.. I also added some tests and refactored existing ones so they make sense. A few need to be implemented though. Tests are now (almost) in mini test format - moving them slowly away from shoulda/mocka.
…into super-admin * 'super-admin' of github.com:WaYdotNET/padrino-framework: Refactored the admin generators to support namespaced apps and to read a bit better. Also disabled `-a` since it wasn't really doing anything and left a few notes to implement them. Please, see the conversation at: padrino#854 (comment) I don't think this should be a blocker to release 0.11.0 and the rest of the admin needs to get there in time!..
6d51246 improved relative awareness of admin |
Please use |
With padrino-admin-0.10.6
If I try to use the --root or -r option when generating admin, an error message appears
if I try without this option, generation goes fine.
The text was updated successfully, but these errors were encountered: