{"record":{"id":"5335a9ef136c9b2a","repo":"jdx/mise","slug":"evaluating-the-tap-definition-for-name-requires","errorCode":null,"errorMessage":"evaluating the tap definition for {name} requires Ruby 3 or newer; install a compatible Ruby or run the apply command","messagePattern":"evaluating the tap definition for (.+?) requires Ruby 3 or newer; install a compatible Ruby or run the apply command","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/tap.rs","lineNumber":226,"sourceCode":"        .is_some()\n}\n\nasync fn ruby_for_metadata(name: &str, provision_ruby: bool) -> Result<PathBuf> {\n    if let Some(ruby) = usable_system_ruby().await {\n        return Ok(ruby);\n    }\n    if let Some(ruby) = super::source::installed_ruby_bin().await?\n        && ruby_is_compatible(&ruby).await\n    {\n        return Ok(ruby);\n    }\n    if provision_ruby {\n        let ruby = super::source::ruby_bin().await?;\n        if ruby_is_compatible(&ruby).await {\n            return Ok(ruby);\n        }\n    }\n    bail!(\n        \"evaluating the tap definition for {name} requires Ruby 3 or newer; install a compatible Ruby or run the apply command\"\n    )\n}\n\nfn github_repository<'a>(\n    owner: &'a str,\n    tap: &'a str,\n    tap_url: Option<&'a str>,\n) -> Result<(&'a str, String)> {\n    let Some(url) = tap_url else {\n        return Ok((owner, format!(\"homebrew-{tap}\")));\n    };\n    let normalized = url.trim_end_matches('/').trim_end_matches(\".git\");\n    let rest = normalized\n        .strip_prefix(\"https://github.com/\")\n        .ok_or_else(|| eyre::eyre!(\"only GitHub tap URLs can be fetched directly\"))?;\n    let mut parts = rest.split('/');\n    match (parts.next(), parts.next(), parts.next()) {","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/tap.rs#L208-L244","documentation":"Tap formula definitions are Ruby files that Homebrew evaluates; mise needs a Ruby 3+ interpreter to evaluate them safely. If no compatible Ruby is available (and provisioning one via the brew source path either failed or produced an incompatible Ruby), mise refuses rather than attempting evaluation with an old Ruby that would mis-parse modern formula DSL.","triggerScenarios":"`formula_from_ruby`/`cask_from_ruby` -> `ruby_for_metadata` where `provision_ruby` was true but `super::source::ruby_bin()` errored, or `ruby_is_compatible` returned false (Ruby < 3); also hit when provision_ruby is false and no compatible system Ruby exists.","commonSituations":"macOS system Ruby (2.6) being the only Ruby on PATH; mise unable to download its brew-provisioned Ruby (offline or no bottle); a Ruby 2.x shim taking precedence on PATH.","solutions":["Install Ruby 3+ (mise: `mise use ruby@3`) and ensure it precedes system Ruby on PATH","Re-run the apply command which provisions a compatible Ruby automatically","Fix network/proxy issues if the brew Ruby provisioning download failed","For macOS, avoid relying on /usr/bin/ruby (2.6); install a modern Ruby first"],"exampleFix":"// before: system Ruby 2.6 only\n$ ruby --version\nruby 2.6.10\n// after\n$ mise use ruby@3.3\n$ ruby --version\nruby 3.3.0","handlingStrategy":"validation","validationCode":"let v = ruby_version();\nif v.major < 3 { eprintln!(\"need Ruby 3+ for tap metadata evaluation\"); }","typeGuard":"fn is_compatible_ruby(v: (u32, u32)) -> bool { v.0 >= 3 }","tryCatchPattern":null,"preventionTips":["Install Ruby 3+ via mise before using third-party brew taps","Don't rely on macOS system Ruby (2.6) for tap evaluation","Ensure network access for Ruby provisioning, or pre-install a compatible Ruby"],"tags":["homebrew","ruby","version-requirement"],"backgroundTag":"missing-dependency","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}