You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
The `bundler` gem does not participate in the lockfile, but it can still
be included in the list of dependencies that are being updated by
`bundle update` if `--group` is specified.
For example, if a Gemfile contains `bundler-audit` (which depends on
`bundler`) in the `:development` group, then updating with the option
`--group=development` will naturally include `bundler` in the list of
gems to evaluate for updating.
The trouble is that since `bundler` is excluded from the lockfile,
searching the locked gems for a gemspec for bundler will return `nil`.
This caused the following error during `bundle update`:
NoMethodError: undefined method `version' for nil:NilClass
This commit solves this bug by skipping over gems (i.e `bundler`) that
are not in the lockfile when comparing gem versions at the conclusion of
the upgrade command.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Bugfixes:
11
11
- prioritise explicitly requested gems in dependency resolution sort order (@segiddins)
12
12
- reduce memory usage during dependency resolution ([#6114](https://github.com/bundler/bundler/issues/6114), @greysteil)
13
13
- ensure that the default bundler gem is not accidentally activated on ruby 2.5 when using local git overrides (@segiddins)
14
+
- fix `NoMethodError` when using the `--group` option with `bundle update` ([#6156](https://github.com/bundler/bundler/issues/6156), @mattbrictson)
0 commit comments