{"record":{"id":"d2c6178f0baf7d16","repo":"jdx/mise","slug":"no-precompiled-ruby-is-available-for-this-platform-d2c617","errorCode":null,"errorMessage":"no precompiled ruby is available for this platform","messagePattern":"no precompiled ruby is available for this platform","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/ruby.rs","lineNumber":1097,"sourceCode":"                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\n            .install_default_gems(&ctx.config, &tv, ctx.pr.as_ref())","sourceCodeStart":1079,"sourceCodeEnd":1115,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/ruby.rs#L1079-L1115","documentation":"Same install path as the sibling error, but this variant fires when precompiled_platform() returns None — the current platform has no precompiled ruby support at all, so no version/platform pair can be named. Compilation from source is the only remaining option and it is not enabled.","triggerScenarios":"`mise install ruby@<version>` on a platform with no precompiled_platform() mapping (unsupported OS/arch or musl-style environment), while ruby.compile is not enabled.","commonSituations":"Alpine/musl or BSD environments; unusual architectures (riscv64); trying the core ruby plugin where only source builds can work.","solutions":["Enable source compilation: `mise settings set ruby.compile true`","Switch to a supported OS/arch environment (standard glibc linux or macOS) for precompiled installs","Use a plugin that supports your platform (e.g. vfox ruby) if source compilation is impossible"],"exampleFix":"// before\nmise use ruby@3.3.6 // on unsupported platform, compile unset\n// after\nmise settings set ruby.compile true\nmise use ruby@3.3.6","handlingStrategy":"fallback","validationCode":"// detect unsupported platforms before invoking core ruby\nconst PRECOMPILED_PLATFORMS = [\"x86_64-apple-darwin\",\"aarch64-apple-darwin\",\"x86_64-unknown-linux-gnu\",\"aarch64-unknown-linux-gnu\"];\nif (!PRECOMPILED_PLATFORMS.includes(platform) && !compileEnabled) {\n  await $`mise settings set ruby.compile true`;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await $`mise install ruby@${ver}`;\n} catch (e) {\n  if (String(e).includes(\"no precompiled ruby is available for this platform\")) {\n    await $`mise settings set ruby.compile true`;\n    await $`mise install ruby@${ver}`;\n  } else throw e;\n}","preventionTips":["On musl/alpine/BSD hosts always enable ruby.compile up front","Prefer a plugin (vfox ruby) on platforms core ruby cannot precompile for","Document platform constraints in project mise.toml comments so CI picks compile settings accordingly"],"tags":["ruby","install","platform"],"backgroundTag":"unsupported-platform","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"}