{"record":{"id":"bf8bfdec6dc5bfb7","repo":"mileszs/wicked_pdf","slug":"could-not-find-asset-pathname","errorCode":null,"errorMessage":"Could not find asset '#{pathname}'","messagePattern":"Could not find asset '#(.+?)'","errorType":"exception","errorClass":"WickedPdf::WickedPdfHelper::Assets::MissingLocalAsset","httpStatus":null,"severity":"error","filePath":"lib/wicked_pdf/wicked_pdf_helper/assets.rb","lineNumber":260,"sourceCode":"      end\n\n      def read_asset(source)\n        asset = find_asset(source)\n        return asset.to_s.force_encoding('UTF-8') if asset\n\n        unless precompiled_or_absolute_asset?(source)\n          raise MissingLocalAsset, source if WickedPdf.config[:raise_on_missing_assets]\n\n          return\n        end\n\n        pathname = asset_pathname(source)\n        if pathname =~ URI_REGEXP\n          read_from_uri(pathname)\n        elsif File.file?(pathname)\n          IO.read(pathname)\n        elsif WickedPdf.config[:raise_on_missing_assets]\n          raise MissingLocalAsset, pathname if WickedPdf.config[:raise_on_missing_assets]\n        end\n      end\n\n      def read_from_uri(uri)\n        response = Net::HTTP.get_response(URI(uri))\n\n        unless response.is_a?(Net::HTTPSuccess)\n          raise MissingRemoteAsset.new(uri, response) if WickedPdf.config[:raise_on_missing_assets]\n\n          return\n        end\n\n        asset = response.body\n        asset.force_encoding('UTF-8') if asset\n        asset = gzip(asset) if WickedPdf.config[:expect_gzipped_remote_assets]\n        asset\n      end\n","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/mileszs/wicked_pdf/blob/bce498de547cdf00d037fdbec29fae844d69ee8e/lib/wicked_pdf/wicked_pdf_helper/assets.rb#L242-L278","documentation":"Error \"Could not find asset '#{pathname}'\" thrown in mileszs/wicked_pdf.","triggerScenarios":"Thrown at lib/wicked_pdf/wicked_pdf_helper/assets.rb:260 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":"bce498de547cdf00d037fdbec29fae844d69ee8e","analyzedAt":"2026-08-23T09:58:24.694Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}