ruby/rubygems · error · Gem::Security::Exception

missing signature for #{file}

Error message

missing signature for #{file}

What it means

Error "missing signature for #{file}" thrown in ruby/rubygems.

Source

Thrown at lib/rubygems/security/policy.rb:264

    if @only_trusted
      check_trust chain, digester, trust_dir
    elsif signatures.empty? && digests.empty?
      # trust is irrelevant if there's no signatures to verify
    else
      alert_warning "#{subject signer} is not trusted for #{full_name}"
    end

    signatures.each do |file, _|
      digest = signer_digests[file]

      raise Gem::Security::Exception, "missing digest for #{file}" unless
        digest
    end

    signer_digests.each do |file, digest|
      signature = signatures[file]

      raise Gem::Security::Exception, "missing signature for #{file}" unless
        signature

      check_data signer.public_key, digester, signature, digest if @verify_data
    end

    true
  end

  ##
  # Extracts the certificate chain from the +spec+ and calls #verify to ensure
  # the signatures and certificate chain is valid according to the policy..

  def verify_signatures(spec, digests, signatures)
    chain = spec.cert_chain.map do |cert_pem|
      OpenSSL::X509::Certificate.new cert_pem
    end

    verify chain, nil, digests, signatures, spec.full_name

View on GitHub (pinned to 86cbb817a3)

Solutions

  1. Re-sign the gem so a signature for the named file is included

When it happens

Trigger: Thrown at lib/rubygems/security/policy.rb:264 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/31297fbc29a73871. Report an issue: GitHub.