{"record":{"id":"f0bbceb8842766af","repo":"jdx/mise","slug":"no-precompiled-ruby-found-for-tv-on-platform","errorCode":null,"errorMessage":"no precompiled ruby found for {tv} on {platform}","messagePattern":"no precompiled ruby found for (.+?) on (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/ruby.rs","lineNumber":1096,"sourceCode":"                self.install_rubygems_hook(&installed_tv)?;\n                if let Err(err) = self\n                    .install_default_gems(&ctx.config, &installed_tv, ctx.pr.as_ref())\n                    .await\n                {\n                    warn!(\"failed to install default ruby gems {err:#}\");\n                }\n                return Ok(installed_tv);\n            }\n            // `ruby.compile = false` opts out of source builds entirely, so a missing\n            // precompiled binary is an error instead of a silent ruby-build fallback.\n            if self.precompiled_only() {\n                hint!(\n                    \"ruby_compile\",\n                    \"To compile ruby from source, run\",\n                    \"mise settings ruby.compile=true\"\n                );\n                match self.precompiled_platform() {\n                    Some(platform) => bail!(\"no precompiled ruby found for {tv} on {platform}\"),\n                    None => bail!(\"no precompiled ruby is available for this platform\"),\n                }\n            }\n        }\n        // No precompiled available, fall through to compile from source\n\n        // Compile from source\n        let _ = Settings::get().ruby_compile(CompilePurpose::Install);\n        if let Err(err) = self.update_build_tool(Some(ctx)).await {\n            warn!(\"ruby build tool update error: {err:#}\");\n        }\n        ctx.pr.set_message(\"ruby-build\".into());\n        self.install_cmd(&ctx.config, &tv, ctx.pr.as_ref())\n            .await?\n            .execute()?;\n\n        self.install_rubygems_hook(&tv)?;\n        if let Err(err) = self","sourceCodeStart":1078,"sourceCodeEnd":1114,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/ruby.rs#L1078-L1114","documentation":"During ruby install, when no precompiled build can be selected for the requested version and compilation is disabled, the plugin resolves precompiled_platform(); if a platform key exists it reports the precise miss (version + platform), otherwise the generic platform-unavailable message. It is thrown because the requested ruby has no precompiled artifact and source compilation is not enabled.","triggerScenarios":"`mise install ruby@<version>` where the precompiled release catalog has no matching build for tv.version on the resolved platform, and the ruby_compile hint shows because ruby.compile is not enabled.","commonSituations":"Requesting a ruby version published before precompiled builds started (e.g. very old 2.x); a platform whose builds lag upstream releases; ruby.compile left unset so mise never falls back to ruby-build.","solutions":["Enable compilation: `mise settings set ruby.compile true`","Choose a ruby version with precompiled builds for your platform (e.g. `mise use ruby@3.3.6`)","Set ruby.precompiled_url to a source hosting builds for that version/platform"],"exampleFix":"// before\nmise use ruby@2.1.2 // no precompiled build\n// after\nmise settings set ruby.compile true\nmise use ruby@2.1.2","handlingStrategy":"fallback","validationCode":"// pre-check that the ruby version has a precompiled build for this platform\nconst hasPrecompiled = releases.some(r => r.version === ver && r.platform === currentPlatform);\nif (!hasPrecompiled && !compileEnabled) throw new Error(`ruby ${ver} has no precompiled build; enable ruby.compile`);","typeGuard":null,"tryCatchPattern":"try {\n  await $`mise install ruby@${ver}`;\n} catch (e) {\n  if (String(e).includes(\"no precompiled ruby found\")) {\n    await $`mise settings set ruby.compile true`;\n    await $`mise install ruby@${ver}`;\n  } else throw e;\n}","preventionTips":["Leave ruby.compile unset (auto) so missing precompileds fall back to source builds","Pin ruby versions recent enough to have precompiled builds for your platform","Consult ruby-build's release list when targeting older ruby versions"],"tags":["ruby","install","precompiled"],"backgroundTag":"resource-not-found","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"}