{"record":{"id":"19fe1b218d34bc99","repo":"jdx/mise","slug":"api-metadata-has-no-ruby-source-path","errorCode":null,"errorMessage":"{}: API metadata has no ruby_source_path","messagePattern":"(.+?): API metadata has no ruby_source_path","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/source.rs","lineNumber":81,"sourceCode":"pub(super) fn check_buildable(formula: &Formula) -> Result<()> {\n    let Some(src) = formula.stable_url() else {\n        bail!(\"{}: formula has no stable source URL\", formula.name);\n    };\n    if let Some(using) = &src.using {\n        bail!(\n            \"{}: source uses the {using:?} download strategy, which mise cannot build from \\\n             (and no bottle exists for this machine)\",\n            formula.name,\n        );\n    }\n    if src.checksum.is_none() {\n        bail!(\"{}: source archive has no sha256 in the API\", formula.name);\n    }\n    // the formula .rb must be pinned to the API snapshot's commit and\n    // verifiable — evaluating a newer/unverified formula against older\n    // source metadata would build the wrong thing\n    if formula.ruby_source_path.is_none() {\n        bail!(\"{}: API metadata has no ruby_source_path\", formula.name);\n    }\n    if formula.tap_git_head.is_none() {\n        bail!(\"{}: API metadata has no tap_git_head\", formula.name);\n    }\n    if formula\n        .ruby_source_checksum\n        .as_ref()\n        .and_then(|c| c.sha256.as_deref())\n        .is_none()\n    {\n        bail!(\"{}: API metadata has no formula checksum\", formula.name);\n    }\n    Ok(())\n}\n\n/// Build a formula from source into its keg and link it.\npub(super) async fn build(\n    rf: &ResolvedFormula,","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/brew/source.rs#L63-L99","documentation":"To build from source reproducibly, mise pins the formula's Ruby definition to the exact commit recorded in the Homebrew API snapshot. When the API metadata lacks `ruby_source_path`, mise cannot locate/verify the .rb and bails before any download or build.","triggerScenarios":"`check_buildable` inspects `formula.ruby_source_path` and finds None for a formula that must be built from source (no bottle for host).","commonSituations":"Incomplete/older API snapshot data; tap formulas fetched without ruby_source metadata; installing on platforms that force the source path for formulas whose metadata predates these fields.","solutions":["Refresh the Homebrew API metadata (`brew update` or clear mise's brew cache) and retry","Install a version with an available bottle instead of building from source","Use brew directly for this formula; mise requires full API metadata to build it safely","Report to mise if a current API snapshot still lacks ruby_source_path for a mainstream formula"],"exampleFix":"null","handlingStrategy":"validation","validationCode":"curl -s https://formulae.brew.sh/api/formula/<name>.json | jq -e '.ruby_source_path' >/dev/null && echo ok || echo 'missing ruby_source_path'","typeGuard":null,"tryCatchPattern":"catch 'API metadata has no ruby_source_path' => refresh metadata (brew update / clear mise cache) then retry; otherwise switch to a bottle or brew direct","preventionTips":["Keep brew API metadata fresh","Avoid third-party taps lacking full API metadata on source-build paths","Prefer bottle-backed installs","Verify API JSON fields before scripting installs"],"tags":["homebrew","api-metadata","build-from-source"],"backgroundTag":"missing-required-config-field","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}