{"record":{"id":"63124748cd4c25d1","repo":"mileszs/wicked_pdf","slug":"could-not-find-binary-xvfb-run-on-the-system","errorCode":null,"errorMessage":"Could not find binary xvfb-run on the system.","messagePattern":"Could not find binary xvfb-run on the system\\.","errorType":"exception","errorClass":"StandardError","httpStatus":null,"severity":"error","filePath":"lib/wicked_pdf/binary.rb","lineNumber":33,"sourceCode":"      raise \"#{EXE_NAME} is not executable\" unless File.executable?(@path)\n    end\n\n    def version\n      @version ||= retrieve_binary_version\n    end\n\n    def parse_version_string(version_info)\n      match_data = /wkhtmltopdf\\s*(\\d*\\.\\d*\\.\\d*\\w*)/.match(version_info)\n      if match_data && (match_data.length == 2)\n        Gem::Version.new(match_data[1])\n      else\n        default_version\n      end\n    end\n\n    def xvfb_run_path\n      path = possible_binary_locations.map { |l| File.expand_path(\"#{l}/xvfb-run\") }.find { |location| File.exist?(location) }\n      raise StandardError, 'Could not find binary xvfb-run on the system.' unless path\n\n      path\n    end\n\n    private\n\n    def retrieve_binary_version\n      stdin, stdout, stderr = Open3.popen3(@path + ' -V')\n      stdin.close\n      stderr.close\n      parse_version_string(stdout.gets(nil))\n    rescue StandardError\n      default_version\n    end\n\n    def find_binary_path\n      exe_path ||= WickedPdf.config[:exe_path] unless WickedPdf.config.empty?\n      exe_path ||= possible_which_path","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/mileszs/wicked_pdf/blob/bce498de547cdf00d037fdbec29fae844d69ee8e/lib/wicked_pdf/binary.rb#L15-L51","documentation":"Error \"Could not find binary xvfb-run on the system.\" thrown in mileszs/wicked_pdf.","triggerScenarios":"Thrown at lib/wicked_pdf/binary.rb:33 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"}