jdx/mise · error

{}: API metadata has no ruby_source_path

Error message

{}: API metadata has no ruby_source_path

What it means

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.

Source

Thrown at src/system/packages/brew/source.rs:80

pub fn check_buildable(formula: &Formula) -> Result<()> {
    let Some(src) = formula.stable_url() else {
        bail!("{}: formula has no stable source URL", formula.name);
    };
    if let Some(using) = &src.using {
        bail!(
            "{}: source uses the {using:?} download strategy, which mise cannot build from \
             (and no bottle exists for this machine)",
            formula.name,
        );
    }
    if src.checksum.is_none() {
        bail!("{}: source archive has no sha256 in the API", formula.name);
    }
    // the formula .rb must be pinned to the API snapshot's commit and
    // verifiable — evaluating a newer/unverified formula against older
    // source metadata would build the wrong thing
    if formula.ruby_source_path.is_none() {
        bail!("{}: API metadata has no ruby_source_path", formula.name);
    }
    if formula.tap_git_head.is_none() {
        bail!("{}: API metadata has no tap_git_head", formula.name);
    }
    if formula
        .ruby_source_checksum
        .as_ref()
        .and_then(|c| c.sha256.as_deref())
        .is_none()
    {
        bail!("{}: API metadata has no formula checksum", formula.name);
    }
    Ok(())
}

/// Build a formula from source into its keg and link it.
pub async fn build(
    rf: &ResolvedFormula,

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Clear mise's Homebrew API cache and retry so complete metadata is fetched
  2. Update mise to the latest version
  3. Install the formula with native Homebrew instead of building via mise
Defensive patterns

Strategy: retry

Try / catch

match check_buildable(&formula) {
    Err(e) if e.to_string().contains("ruby_source_path") => {
        clear_homebrew_api_cache()?;
        check_buildable(&formula)
    }
    other => other,
}

Prevention

When it happens

Trigger: formula.ruby_source_path is None during check_buildable, on a source-build path (no bottle for the host).

Common situations: Stale or partial Homebrew API cache; unusual taps that do not emit ruby_source_path; API snapshot races after upstream updates.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/19fe1b218d34bc99. Report an issue: GitHub.