{"record":{"id":"49e86a2167fa5e1b","repo":"ruby/rubygems","slug":"post-build-hook-location-failed-for-spec-full","errorCode":null,"errorMessage":"post-build hook#{location} failed for #{spec.full_name}","messagePattern":"post-build hook#(.+?) failed for #(.+?)","errorType":"exception","errorClass":"Gem::InstallError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/installer.rb","lineNumber":334,"sourceCode":"  def run_pre_install_hooks # :nodoc:\n    Gem.pre_install_hooks.each do |hook|\n      next unless hook.call(self) == false\n      location = \" at #{$1}\" if hook.inspect =~ /[ @](.*:\\d+)/\n\n      message = \"pre-install hook#{location} failed for #{spec.full_name}\"\n      raise Gem::InstallError, message\n    end\n  end\n\n  def run_post_build_hooks # :nodoc:\n    Gem.post_build_hooks.each do |hook|\n      next unless hook.call(self) == false\n      FileUtils.rm_rf gem_dir\n\n      location = \" at #{$1}\" if hook.inspect =~ /[ @](.*:\\d+)/\n\n      message = \"post-build hook#{location} failed for #{spec.full_name}\"\n      raise Gem::InstallError, message\n    end\n  end\n\n  def run_post_install_hooks # :nodoc:\n    Gem.post_install_hooks.each do |hook|\n      hook.call self\n    end\n  end\n\n  ##\n  #\n  # Return an Array of Specifications contained within the gem_home\n  # we'll be installing into.\n\n  def installed_specs\n    @installed_specs ||= begin\n      specs = []\n","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/installer.rb#L316-L352","documentation":"Error \"post-build hook#{location} failed for #{spec.full_name}\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/installer.rb:334 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix or remove the failing post-build hook (see the reported hook location)","Re-run with `-V` for verbose output to see why the hook failed"],"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"}