{"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":80,"sourceCode":"pub 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 async fn build(\n    rf: &ResolvedFormula,","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/packages/brew/source.rs#L62-L98","documentation":"To build from source, mise must fetch the formula's .rb file and pin it to the exact commit the API snapshot was generated from, so the evaluated formula matches the source metadata. That requires ruby_source_path in the API JSON; when absent, the formula file cannot be located and check_buildable fails early so nothing is half-built.","triggerScenarios":"formula.ruby_source_path is None during check_buildable, on a source-build path (no bottle for the host).","commonSituations":"Stale or partial Homebrew API cache; unusual taps that do not emit ruby_source_path; API snapshot races after upstream updates.","solutions":["Clear mise's Homebrew API cache and retry so complete metadata is fetched","Update mise to the latest version","Install the formula with native Homebrew instead of building via mise"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match check_buildable(&formula) {\n    Err(e) if e.to_string().contains(\"ruby_source_path\") => {\n        clear_homebrew_api_cache()?;\n        check_buildable(&formula)\n    }\n    other => other,\n}","preventionTips":["Treat incomplete Homebrew API metadata as a cache problem first — refresh and retry","Keep mise updated for newer API JSON shapes","Fall back to native brew for formulae whose metadata remains incomplete"],"tags":["brew","source-build","formula-metadata","homebrew-api"],"backgroundTag":"missing-package-metadata","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}