jdx/mise · error

no precompiled ruby found for

Error message

no precompiled ruby found for {tv} on {platform}

What it means

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.

Solutions

  1. Enable compilation: `mise settings set ruby.compile true`
  2. Choose a ruby version with precompiled builds for your platform (e.g. `mise use ruby@3.3.6`)
  3. Set ruby.precompiled_url to a source hosting builds for that version/platform

Example fix

// before
mise use ruby@2.1.2 // no precompiled build
// after
mise settings set ruby.compile true
mise use ruby@2.1.2
Defensive patterns

Strategy: fallback

Validate before calling

// pre-check that the ruby version has a precompiled build for this platform
const hasPrecompiled = releases.some(r => r.version === ver && r.platform === currentPlatform);
if (!hasPrecompiled && !compileEnabled) throw new Error(`ruby ${ver} has no precompiled build; enable ruby.compile`);

Try / catch

try {
  await $`mise install ruby@${ver}`;
} catch (e) {
  if (String(e).includes("no precompiled ruby found")) {
    await $`mise settings set ruby.compile true`;
    await $`mise install ruby@${ver}`;
  } else throw e;
}

Prevention

When it happens

Trigger: `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.

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

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at src/plugins/core/ruby.rs:1096

                self.install_rubygems_hook(&installed_tv)?;
                if let Err(err) = self
                    .install_default_gems(&ctx.config, &installed_tv, ctx.pr.as_ref())
                    .await
                {
                    warn!("failed to install default ruby gems {err:#}");
                }
                return Ok(installed_tv);
            }
            // `ruby.compile = false` opts out of source builds entirely, so a missing
            // precompiled binary is an error instead of a silent ruby-build fallback.
            if self.precompiled_only() {
                hint!(
                    "ruby_compile",
                    "To compile ruby from source, run",
                    "mise settings ruby.compile=true"
                );
                match self.precompiled_platform() {
                    Some(platform) => bail!("no precompiled ruby found for {tv} on {platform}"),
                    None => bail!("no precompiled ruby is available for this platform"),
                }
            }
        }
        // No precompiled available, fall through to compile from source

        // Compile from source
        let _ = Settings::get().ruby_compile(CompilePurpose::Install);
        if let Err(err) = self.update_build_tool(Some(ctx)).await {
            warn!("ruby build tool update error: {err:#}");
        }
        ctx.pr.set_message("ruby-build".into());
        self.install_cmd(&ctx.config, &tv, ctx.pr.as_ref())
            .await?
            .execute()?;

        self.install_rubygems_hook(&tv)?;
        if let Err(err) = self

View on GitHub (pinned to 533346cc37)