Skip to content

Unresolved or ambiguous specs during Gem::Specification.reset: stringio #889

@scivola

Description

@scivola

An unnecessary warning message is shown, when Bundler.require is included in a Thor file.

Minimal reproduction codes

Gemfile:

source "https://rubygems.org"

gem "stringio"

tasks.thor:

require "bundler"
Bundler.require

Terminal:

% thor -T
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
      stringio (>= 0)
      Available/installed versions of this gem:
      - 3.1.2
      - 3.1.1
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.

Even if we remove gem "stringio" line from the Gemfile, the result is same.
Also, defining some tasks in tasks.thor will no change to the result.

Environment

% ruby -v
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin24]
% gem --version
3.5.23
% bundler --version
Bundler version 2.5.23
% gem list thor stringio

*** LOCAL GEMS ***

thor (1.3.2)

*** LOCAL GEMS ***

stringio (3.1.2, default: 3.1.1)

Needless to say, we cannot uninstall stringio 3.1.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions