{"record":{"id":"d8bb20c443d9b9c9","repo":"ruby/rubygems","slug":"cert-file-does-not-exist","errorCode":null,"errorMessage":"#{cert_file}: does not exist","messagePattern":"#(.+?): does not exist","errorType":"exception","errorClass":"Gem::OptionParser::InvalidArgument","httpStatus":null,"severity":"error","filePath":"lib/rubygems/commands/cert_command.rb","lineNumber":55,"sourceCode":"               \"Signing certificate for --sign\") do |cert_file, options|\n      options[:issuer_cert] = open_cert(cert_file)\n      options[:issuer_cert_file] = cert_file\n    end\n\n    add_option(\"-K\", \"--private-key KEY\",\n               \"Key for --sign or --build\") do |key_file, options|\n      options[:key] = open_private_key(key_file)\n    end\n\n    add_option(\"-A\", \"--key-algorithm ALGORITHM\",\n               \"Select which key algorithm to use for --build\") do |algorithm, options|\n      options[:key_algorithm] = algorithm\n    end\n\n    add_option(\"-s\", \"--sign CERT\",\n               \"Signs CERT with the key from -K\",\n               \"and the certificate from -C\") do |cert_file, options|\n      raise Gem::OptionParser::InvalidArgument, \"#{cert_file}: does not exist\" unless\n        File.file? cert_file\n\n      options[:sign] << cert_file\n    end\n\n    add_option(\"-d\", \"--days NUMBER_OF_DAYS\",\n               \"Days before the certificate expires\") do |days, options|\n      options[:expiration_length_days] = days.to_i\n    end\n\n    add_option(\"-R\", \"--re-sign\",\n               \"Re-signs the certificate from -C with the key from -K\") do |resign, options|\n      options[:resign] = resign\n    end\n  end\n\n  def add_certificate(certificate) # :nodoc:\n    Gem::Security.trust_dir.trust_cert certificate","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/commands/cert_command.rb#L37-L73","documentation":"Error \"#{cert_file}: does not exist\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/commands/cert_command.rb:55 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"}