jdx/mise · error

Ruby engine ' ' is not supported on Windows. Only standard…

Error message

Ruby engine '{}' is not supported on Windows.
Only standard MRI Ruby versions can be installed via RubyInstaller2.

What it means

mise's Windows Ruby core plugin only supports standard MRI (CRuby) versions, which are installed via RubyInstaller2. When the requested tool version parses as a non-MRI engine (e.g. jruby, truffleruby, rbx variants), install_version_ aborts before downloading anything, since RubyInstaller2 cannot provide those engines on Windows.

Solutions

  1. Install a standard MRI Ruby version on Windows (e.g. `mise use ruby@3.3.0`), which is supported via RubyInstaller2
  2. Remove the non-MRI engine (jruby/truffleruby) from your mise config on Windows machines, or scope it per-environment
  3. If you genuinely need JRuby/TruffleRuby on Windows, use WSL and install it there instead of native Windows

Example fix

// before (mise.toml on Windows)
[tools]
ruby = "jruby-9.4.5.0"
// after
[tools]
ruby = "3.3.0"
Defensive patterns

Strategy: validation

Validate before calling

const MRI_RE = /^\d+\.\d+\.\d+(-\w+)?$/;
if (!MRI_RE.test(rubyVersion)) throw new Error(`Refusing to install non-MRI ruby ${rubyVersion} on Windows`);

Type guard

function isMriVersion(v) { return /^\d+(\.\d+)*$/.test(v) || /^\d+\.\d+\.\d+/.test(v); }

Prevention

When it happens

Trigger: Running `mise install ruby@<version>` (or having it in a tool-versions/mise.toml) on Windows where is_mri_version() returns false for the version string — e.g. 'jruby-9.4.0.0', 'truffleruby+graalvm-22.3.1', or an unusual version literal that fails the MRI check.

Common situations: A repo config (.tool-versions or mise.toml) written on macOS/Linux with a non-MRI Ruby engine is used on Windows; a developer copies a team config that pins jruby; typos or nonstandard version strings that don't parse as MRI.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


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

Appendix: source

Thrown at src/plugins/core/ruby_windows.rs:229

                body.trim()
                    .trim_start_matches("ruby-")
                    .trim_start_matches('v')
                    .to_string()
            }
        };
        if v.is_empty() {
            return Ok(vec![]);
        }
        Ok(vec![v])
    }

    async fn install_version_(
        &self,
        ctx: &InstallContext,
        mut tv: ToolVersion,
    ) -> eyre::Result<ToolVersion> {
        if !super::ruby_common::is_mri_version(&tv.version) {
            bail!(
                "Ruby engine '{}' is not supported on Windows.\n\
                 Only standard MRI Ruby versions can be installed via RubyInstaller2.",
                tv.version
            );
        }
        let tarball = self.download(&tv, ctx.pr.as_ref()).await?;
        self.verify_checksum(ctx, &mut tv, &tarball)?;
        self.install(ctx, &tv, &tarball).await?;
        self.verify(ctx, &tv).await?;
        self.install_rubygems_hook(&tv)?;
        self.test_gem(&ctx.config, &tv, ctx.pr.as_ref()).await?;
        if let Err(err) = self
            .install_default_gems(&ctx.config, &tv, ctx.pr.as_ref())
            .await
        {
            warn!("failed to install default ruby gems {err:#}");
        }
        Ok(tv)

View on GitHub (pinned to 533346cc37)