Skip to content

Bundle install: NoMethodError: undefined method `full_name' for nil:NilClass #5985

@belgoros

Description

@belgoros

Describe the problem as clearly as you can

Running bundle install fails on a Windows PC (see more details below).
#5970 didn't fix the issue.

Did you try upgrading rubygems & bundler?

The same error before the upgrade and after upgrading RubyGems to 3.3.23 and bundler to 2.3.23.

Post steps to reproduce the problem

I'm using scoop to install Ruby and manage other applications/versions.

  • install Ruby with scoop (used version: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt])
  • install bundler
  • run gem update --system to update to the latest rubygems version
  • create an empty directory and cd to it in your terminal
  • run bundle init to create an empty Gemfile
  • add the following content to the generated Gemfile
# frozen_string_literal: true

source "https://rubygems.org"

gem 'rails'
gem 'mysql2', '~> 0.5.4'
  • run bundle to install dependencies

  • observe the failure report

Which command did you run?

bundle install

What were you expecting to happen?

Listed in Gemfile gems should be installed

What actually happened?

C:\Users\scambour\myprojects\ruby\izimi\certinot-service>bundle
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies....
Your lockfile was created by an old Bundler that left some things out.
Because of the missing DEPENDENCIES, we can only install gems one at a time, instead of installing 8 at a time.
You can fix this by adding the missing gems to your Gemfile, running bundle install, and then removing the gems from your Gemfile.
The missing gems are:
* mini_portile2 depended upon by nokogiri
Using rake 13.0.6
Using concurrent-ruby 1.1.10
Using i18n 1.12.0
Using minitest 5.16.3
Using tzinfo 2.0.5
Using activesupport 7.0.4
Using builder 3.2.4
Using erubi 1.11.0
Using racc 1.6.0
Installing nokogiri 1.13.8 with native extensions
--- ERROR REPORT TEMPLATE -------------------------------------------------------

NoMethodError: undefined method `full_name' for nil:NilClass

  warning << "* #{unmet_spec_dependency}, depended upon #{spec.full_name}, unsatisfied by #{@specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) }.full_name}"
                                                                                                                                                                                           ^^^^^^^^^^
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:124:in `block (2 levels) in check_for_unmet_dependencies'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:123:in `each'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:123:in `block in check_for_unmet_dependencies'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:122:in `each'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:122:in `check_for_unmet_dependencies'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:100:in `call'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer/parallel_installer.rb:71:in `call'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer.rb:254:in `install_in_parallel'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer.rb:209:in `install'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer.rb:89:in `block in run'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/process_lock.rb:12:in `block in lock'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/process_lock.rb:9:in `open'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/process_lock.rb:9:in `lock'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer.rb:71:in `run'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/installer.rb:23:in `install'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/cli/install.rb:62:in `run'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/cli.rb:257:in `block in install'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/settings.rb:131:in `temporary'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/cli.rb:256:in `install'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/cli.rb:31:in `dispatch'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/cli.rb:25:in `start'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/exe/bundle:48:in `block in <top (required)>'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
  C:/Users/scambour/scoop/persist/ruby/gems/gems/bundler-2.3.23/exe/bundle:36:in `<top (required)>'
  C:/Users/scambour/scoop/apps/ruby/current/bin/bundle:32:in `load'
  C:/Users/scambour/scoop/apps/ruby/current/bin/bundle:32:in `<main>'

Environment

Bundler       2.3.23
  Platforms   ruby, x64-mingw-ucrt
Ruby          3.1.2p20 (2022-04-12 revision 4491bb740a9506d76391ac44bb2fe6e483fec952) [x64-mingw-ucrt]
  Full Path   C:/Users/scambour/scoop/apps/ruby/3.1.2-1/bin/ruby.exe
  Config Dir  C:/ProgramData
RubyGems      3.3.23
  Gem Home    C:/Users/scambour/scoop/persist/ruby/gems
  Gem Path    C:/Users/scambour/scoop/persist/ruby/gems
  User Home   C:/Users/scambour
  User Path   C:/Users/scambour/.local/share/gem/ruby/3.1.0
  Bin Dir     C:/Users/scambour/scoop/persist/ruby/gems/bin
OpenSSL
  Compiled    OpenSSL 1.1.1n  15 Mar 2022
  Loaded      OpenSSL 1.1.1n  15 Mar 2022
  Cert File   C:/Users/scambour/scoop/apps/ruby/current/ssl/cert.pem
  Cert Dir    C:/Users/scambour/scoop/apps/ruby/current/ssl/certs
Tools
  Git         2.37.0.windows.1
  RVM         not installed
  rbenv       not installed
  chruby      not installed

Bundler Build Metadata

Built At          2022-10-05
Git SHA           250d9d485d
Released Version  true

Bundler settings

gem.changelog
  Set for the current user (C:/Users/scambour/.bundle/config): false
gem.ci
  Set for the current user (C:/Users/scambour/.bundle/config): false
gem.linter
  Set for the current user (C:/Users/scambour/.bundle/config): false
gem.test
  Set for the current user (C:/Users/scambour/.bundle/config): "minitest"

Gemfile

Gemfile

# frozen_string_literal: true

source "https://rubygems.org"

gem 'rails'
gem 'mysql2', '~> 0.5.4'

Gemfile.lock

<No C:/Users/scambour/myprojects/ruby/izimi/certinot-service/Gemfile.lock found>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions