{"record":{"id":"716e8bd4212298e2","repo":"ruby/rubygems","slug":"override-all-version-is-not-allowed-version","errorCode":null,"errorMessage":"`override :all, version:` is not allowed; version requirements are per-gem","messagePattern":"`override :all, version:` is not allowed; version requirements are per-gem","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/bundler/dsl.rb","lineNumber":205,"sourceCode":"      with_source(@sources.add_git_source(normalize_hash(options).merge(\"uri\" => uri)), &blk)\n    end\n\n    def github(repo, options = {})\n      raise InvalidArgumentError, \"GitHub sources require a block\" unless block_given?\n      github_uri  = @git_sources[\"github\"].call(repo)\n      git_options = normalize_hash(options).merge(\"uri\" => github_uri)\n      git_source  = @sources.add_git_source(git_options)\n      with_source(git_source) { yield }\n    end\n\n    SUPPORTED_OVERRIDE_FIELDS = [:version, :required_ruby_version, :required_rubygems_version].freeze\n    SUPPORTED_OVERRIDE_SYMBOL_OPERATIONS = [:ignore_upper].freeze\n\n    def override(target, **operations)\n      validate_override_target!(target)\n\n      if target == :all && operations.key?(:version)\n        raise ArgumentError, \"`override :all, version:` is not allowed; version requirements are per-gem\"\n      end\n\n      operations.each do |field, operation|\n        validate_override_field!(field)\n        validate_override_operation!(operation)\n        validate_override_uniqueness!(target, field)\n      end\n\n      source_location = caller_locations(1, 1)&.first\n      operations.each do |field, operation|\n        @overrides << Override.new(target, field, operation, source_location: source_location)\n      end\n    end\n\n    def to_definition(lockfile, unlock)\n      check_primary_source_safety\n      lockfile = @lockfile unless @lockfile.nil?\n      Definition.new(lockfile, @dependencies, @sources, unlock, @ruby_version, @optional_groups, @gemfiles, @overrides)","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/dsl.rb#L187-L223","documentation":"Error \"`override :all, version:` is not allowed; version requirements are per-gem\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/dsl.rb:205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}