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 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.

Solutions

  1. Refresh the Homebrew API metadata (`brew update` or clear mise's brew cache) and retry
  2. Install a version with an available bottle instead of building from source
  3. Use brew directly for this formula; mise requires full API metadata to build it safely
  4. Report to mise if a current API snapshot still lacks ruby_source_path for a mainstream formula

Example fix

null
Defensive patterns

Strategy: validation

Validate before calling

curl -s https://formulae.brew.sh/api/formula/<name>.json | jq -e '.ruby_source_path' >/dev/null && echo ok || echo 'missing ruby_source_path'

Try / catch

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

Prevention

When it happens

Trigger: `check_buildable` inspects `formula.ruby_source_path` and finds None for a formula that must be built from source (no bottle for host).

Common situations: 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.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

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

pub(super) 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(super) async fn build(
    rf: &ResolvedFormula,

View on GitHub (pinned to 533346cc37)