{"record":{"id":"32cd5fbf37c5fb1a","repo":"ruby/rubygems","slug":"name-is-too-big-over-limit-bytes","errorCode":null,"errorMessage":"#{name} is too big (over #{limit} bytes)","messagePattern":"#(.+?) is too big \\(over #(.+?) bytes\\)","errorType":"exception","errorClass":"Gem::Package::FormatError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/package.rb","lineNumber":750,"sourceCode":"\n    if (duplicates = @files.group_by {|f| f }.select {|_k,v| v.size > 1 }.map(&:first)) && duplicates.any?\n      raise Gem::Security::Exception, \"duplicate files in the package: (#{duplicates.map(&:inspect).join(\", \")})\"\n    end\n  end\n\n  if RUBY_ENGINE == \"truffleruby\"\n    def copy_stream(src, dst, size) # :nodoc:\n      dst.write src.read(size)\n    end\n  else\n    def copy_stream(src, dst, size) # :nodoc:\n      IO.copy_stream(src, dst, size)\n    end\n  end\n\n  def limit_read(io, name, limit)\n    bytes = io.read(limit + 1)\n    raise Gem::Package::FormatError, \"#{name} is too big (over #{limit} bytes)\" if bytes.size > limit\n    bytes\n  end\n\n  if Gem.win_platform?\n    # Create a symlink and fallback to copy the file or directory on Windows,\n    # where symlink creation needs special privileges in form of the Developer Mode.\n    # JRuby on Windows raises TypeError from the wincode path-conversion helper\n    # when it cannot create the symlink, so fall back to copy in that case too.\n    def create_symlink(old_name, new_name)\n      File.symlink(old_name, new_name)\n    rescue Errno::EACCES, TypeError\n      from = File.expand_path(old_name, File.dirname(new_name))\n      FileUtils.cp_r(from, new_name)\n    end\n  else\n    def create_symlink(old_name, new_name)\n      File.symlink(old_name, new_name)\n    end","sourceCodeStart":732,"sourceCodeEnd":768,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/package.rb#L732-L768","documentation":"Error \"#{name} is too big (over #{limit} bytes)\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/package.rb:750 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the size of the named file in the package below the limit and rebuild the gem"],"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"}