-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Description
Is it possible to make rails_apps_composer add "require: false" for rubocop when adding it to a Gemfile?
A Rails app I work on was built a couple of months ago using this gem. I'm not sure exactly how the gem was used to create the project.
The resulting Gemfile checked in by a collaborator included the rubocop gem without specifying "require: false". In rubocop's README.md it says to specify "require: false" for rubocop if you put it in a Gemfile. Since this didn't happen there were "NameError: uninitialized constant Net::HTTP" errors in the production environment. (Fortunately this app has not been deployed to production yet.)
This is how the error occurred:
- rubocop requires
net/http. - rubocop is only in the development and test groups in the Gemfile created using rails_apps_composer, so rubocop and
net/httpwere required in the development environment but not in the production environment. - Some code in the app referenced
Net::HTTPwithout requiring it, and it worked in development so it was assumed it was correct.
This seems like a cool project, thanks for your work on it.
Metadata
Metadata
Assignees
Labels
No labels