Skip to content

Instantly share code, notes, and snippets.

@mtsmfm
Last active November 30, 2021 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtsmfm/28e60587643c8fad6031b01c98b0b8cb to your computer and use it in GitHub Desktop.
Save mtsmfm/28e60587643c8fad6031b01c98b0b8cb to your computer and use it in GitHub Desktop.
Bundler 2.2.32 bug
$ git clone https://gist.github.com/mtsmfm/28e60587643c8fad6031b01c98b0b8cb
$ cd 28e60587643c8fad6031b01c98b0b8cb
$ bundle
$ bundle
source "https://rubygems.org"
gem "testgem", path: "."
$ bundle
Using bundler 2.2.32
Bundle complete! 1 Gemfile dependency, 1 gem now installed.
Bundled gems are installed into `/vendor/bundle/2.7.4`
--- ERROR REPORT TEMPLATE -------------------------------------------------------
```
NoMethodError: undefined method `metadata' for nil:NilClass
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli/common.rb:22:in `block in output_fund_metadata_summary'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli/common.rb:22:in `count'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli/common.rb:22:in `output_fund_metadata_summary'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli/install.rb:85:in `run'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli.rb:253:in `block in install'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/settings.rb:131:in `temporary'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli.rb:252:in `install'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli.rb:31:in `dispatch'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/cli.rb:25:in `start'
/usr/local/bundle/gems/bundler-2.2.32/exe/bundle:49:in `block in <top (required)>'
/usr/local/bundle/gems/bundler-2.2.32/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/usr/local/bundle/gems/bundler-2.2.32/exe/bundle:37:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
```
## Environment
```
Bundler 2.2.32
Platforms ruby, x86_64-linux
Ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23704a01d34bd79d09dc37897e00922a) [x86_64-linux]
Full Path /usr/local/bin/ruby
Config Dir /usr/local/etc
RubyGems 3.2.32
Gem Home /vendor/bundle/2.7.4/ruby/2.7.0
Gem Path /vendor/bundle/2.7.4/ruby/2.7.0
User Home /home/quipper
User Path /home/quipper/.local/share/gem/ruby/2.7.0
Bin Dir /vendor/bundle/2.7.4/ruby/2.7.0/bin
OpenSSL
Compiled OpenSSL 1.1.1d 10 Sep 2019
Loaded OpenSSL 1.1.1d 10 Sep 2019
Cert File /usr/lib/ssl/cert.pem
Cert Dir /usr/lib/ssl/certs
Tools
Git 2.20.1
RVM not installed
rbenv not installed
chruby not installed
```
## Bundler Build Metadata
```
Built At 2021-11-23
Git SHA 20d4957649
Released Version true
```
## Bundler settings
```
app_config
Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"
jobs
Set via BUNDLE_JOBS: 4
path
Set via BUNDLE_PATH: "/vendor/bundle/2.7.4"
silence_root_warning
Set via BUNDLE_SILENCE_ROOT_WARNING: true
```
## Gemfile
### Gemfile
```ruby
source "https://rubygems.org"
gem "testgem", path: "."
```
### Gemfile.lock
```
PATH
remote: .
specs:
GEM
remote: https://rubygems.org/
specs:
PLATFORMS
x86_64-linux
DEPENDENCIES
testgem!
BUNDLED WITH
2.2.32
```
--- TEMPLATE END ----------------------------------------------------------------
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=undefined+method+%60metadata%27+for+nil+NilClass&type=Issues
If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.
Gem::Specification.new do |spec|
spec.name = 'testgem'
spec.version = '0.0.0dev'
spec.authors = ['Test']
spec.email = ['test@example.com']
spec.summary = 'test'
spec.files = []
spec.executables = []
spec.require_paths = ['lib']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment