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
Don't load ./Gemfile when creating a new project #571
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.
"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).