ruby/rubygems · error · Bundler::GemNotFound

#{name} is locked to #{locked_version}, while Gemfile is req

Error message

#{name} is locked to #{locked_version}, while Gemfile is requesting #{requirement}. --strict --#{level} was specified, but there are no #{level} level upgrades from #{locked_version} satisfying #{requirement}, so version solving has failed

What it means

Error "#{name} is locked to #{locked_version}, while Gemfile is requesting #{requirement}. --strict --#{level} was specified, but there are no #{level} level upgrades from #{locked_version} satisfying #{requirement}, so version solving has failed" thrown in ruby/rubygems.

Source

Thrown at lib/bundler/resolver.rb:425

      return if locked_platforms.any? {|p| p == Gem::Platform::RUBY }

      "Your current platform (#{local_platform}) is not included in the lockfile's platforms (#{locked_platforms.join(", ")}). " \
        "Add the current platform to the lockfile with\n`bundle lock --add-platform #{local_platform}` and try again."
    rescue GemfileNotFound
      nil
    end

    def filtered_versions_for(package)
      @gem_version_promoter.filter_versions(package, @all_versions[package])
    end

    def raise_all_versions_filtered_out!(package)
      level = @gem_version_promoter.level
      name = package.name
      locked_version = package.locked_version
      requirement = package.dependency

      raise GemNotFound,
        "#{name} is locked to #{locked_version}, while Gemfile is requesting #{requirement}. " \
        "--strict --#{level} was specified, but there are no #{level} level upgrades from #{locked_version} satisfying #{requirement}, so version solving has failed"
    end

    def filter_matching_specs(specs, requirements)
      Array(requirements).flat_map do |requirement|
        specs.select {| spec| requirement_satisfied_by?(requirement, spec) }
      end
    end

    def filter_specs(specs, package)
      filter_remote_specs(filter_cooldown(filter_prereleases(specs, package)), package)
    end

    def filter_prereleases(specs, package)
      return specs unless package.ignores_prereleases? && specs.size > 1

      specs.reject {|s| s.version.prerelease? }

View on GitHub (pinned to 86cbb817a3)

When it happens

Trigger: Thrown at lib/bundler/resolver.rb:425 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23). Data as JSON: /api/errors/7c8aa6de5aa521f4. Report an issue: GitHub.