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
Don't load ./Gemfile when creating a new project #571
Comments
Can u try with latest edge? I fixed a similar problem, now our bins handle bundler correctly. |
Sorry man, not quite yet:
|
Weird not seen anything like this. Even if you do |
@nesquena: no, it's the oposite problem: it DOES load the Gemfile when I don't want to. Imagine you want to create a project, so you run |
Ah I am with you now, hmm that is kind of annoying. This is almost certainly because we auto-load the Gemfile if it exists in our binaries now to avoid having to bundle exec all the time. I can see that being a problem if you want to simply create a project, it probably shouldn't try to load the bundler environment. @DAddYE what do you think? |
Generally when u create a project u are in a directory where there isn't a Gemfile so in this case we use system wide gems. Then if you generate another thing like model, admin etc so you have a Gemfile and we load correctly this has bundle exec do. We can improve a bit this checking for example if we have .components other that Gemfile we are in a padrino root. Can be done for u? @botanicus, @nesquena and @achiu? |
"Generally when u create a project u are in a directory where there isn't a Gemfile so in this case we use system wide gems." That's true, but only "generally". In 10% cases it's not the case (typically quick testing "what will happen if I generate project with ..."). "We can improve a bit this checking for example if we have .components other that Gemfile we are in a padrino root." Too complicated IMHO, what about not load it for project generation and --help, load it otherwise (you never generate controller outside of a project). |
I would say checking for .components is a good idea since without it the generators won't actually work anyways...or equally effective would be to simply not load it only for 'project' generation. I am actually ok either way |
When I'm in a directory with Gemfile, padrino-gen doesn't work (nor even
padrino-gen --help
), it just keeps telling me:The text was updated successfully, but these errors were encountered: