Skip to content

github_changelog_generator fails with Could not find 'minitest' (>= 5.1) among 123 total gem(s) #1057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vanniktech opened this issue Jan 15, 2025 · 4 comments

Comments

@vanniktech
Copy link

When I execute github_changelog_generator, I get the following stacktrace on my Mac:

/Library/Ruby/Site/2.6.0/rubygems/specification.rb:1458:in `rescue in block in activate_dependencies': Could not find 'minitest' (>= 5.1) among 123 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/niklas/.gem/ruby/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0:/Users/niklas/.gem/ruby/3.4.0' at: /Users/niklas/.gem/ruby/3.4.0/specifications/activesupport-8.0.1.gemspec, execute `gem env` for more information
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1455:in `block in activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `each'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1426:in `activate'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1462:in `block in activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `each'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1426:in `activate'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:284:in `block in activate_bin_path'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `synchronize'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `activate_bin_path'
	from /usr/local/bin/github_changelog_generator:23:in `<main>'
/Library/Ruby/Site/2.6.0/rubygems/dependency.rb:314:in `to_specs': Could not find 'minitest' (>= 5.1) among 123 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/niklas/.gem/ruby/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0:/Users/niklas/.gem/ruby/3.4.0' , execute `gem env` for more information
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1456:in `block in activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `each'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1426:in `activate'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1462:in `block in activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `each'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1444:in `activate_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1426:in `activate'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:284:in `block in activate_bin_path'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `synchronize'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `activate_bin_path'
	from /usr/local/bin/github_changelog_generator:23:in `<main>'

When I execute gem install minitest and run again I'm getting:

/Library/Ruby/Site/2.6.0/rubygems/resolver/conflict.rb:47:in `conflicting_dependencies': undefined method `request' for nil:NilClass (NoMethodError)
	from /Library/Ruby/Site/2.6.0/rubygems/exceptions.rb:61:in `conflicting_dependencies'
	from /Library/Ruby/Site/2.6.0/rubygems/exceptions.rb:55:in `initialize'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver.rb:193:in `exception'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver.rb:193:in `raise'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver.rb:193:in `rescue in resolve'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver.rb:191:in `resolve'
	from /Library/Ruby/Site/2.6.0/rubygems/request_set.rb:411:in `resolve'
	from /Library/Ruby/Site/2.6.0/rubygems/request_set.rb:423:in `resolve_current'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:228:in `finish_resolve'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `block in activate_bin_path'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `synchronize'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `activate_bin_path'
	from /usr/local/bin/github_changelog_generator:23:in `<main>'
/Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:317:in `raise_error_unless_state': Unable to satisfy the following requirements: (Gem::Resolver::Molinillo::VersionConflict)

- `drb (= 2.2.1)` required by `user-specified dependency`
	from /Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:297:in `tap'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:254:in `process_topmost_state'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:182:in `resolve'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
	from /Library/Ruby/Site/2.6.0/rubygems/resolver.rb:190:in `resolve'
	from /Library/Ruby/Site/2.6.0/rubygems/request_set.rb:411:in `resolve'
	from /Library/Ruby/Site/2.6.0/rubygems/request_set.rb:423:in `resolve_current'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:228:in `finish_resolve'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `block in activate_bin_path'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `synchronize'
	from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `activate_bin_path'
	from /usr/local/bin/github_changelog_generator:23:in `<main>'

Something is not right. I do have ruby installed via homebrew and ruby --version gives me: ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin23] so I'm not sure why github_changelog_generator is trying to use Ruby 2.6.0

@olleolleolle
Copy link
Collaborator

olleolleolle commented Jan 15, 2025

(The bin/github_changelog_generator script starts with a /usr/bin/env ruby. If you run /usr/bin/env ruby --version, does that show the 2.6 one, which I guess is the "system Ruby", shipping with your computer?)

ActiveSupport depends on minitest. 2.6 is an ancient version of Ruby, no longer supported by these gem versions.

Workaround: If you do not manage to get your shell to recognize the Homebrew-installed Ruby, you could add a Gemfile which has gitHub_changelog_generator in it, and then invoke bundle exec github_changelog_generator.

@vanniktech
Copy link
Author

/usr/bin/env ruby --version

ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [arm64-darwin23]

So this looks good right?

@olleolleolle
Copy link
Collaborator

It does look correct.

Oh, what if the github_changelog_generator shells out, and that shell does not have the correct Ruby in PATH?

@vanniktech
Copy link
Author

How can I check this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@olleolleolle @vanniktech and others