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

On Windows, mise installs ruby through RubyInstaller2, which only publishes standard MRI (Matz) interpreter builds. ruby_common::is_mri_version() rejects any version string carrying a named engine prefix (jruby-9.4.0.0, truffleruby-24.1.1, etc.), and install_version_ fails immediately with this message before any download is attempted. There is no Windows installer backend for alternative ruby engines in mise.

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 6f52dcdf99)

Solutions

  1. Use a standard MRI version on Windows: `mise use ruby@3.3` (plain version, no engine prefix)
  2. Run the alternative engine under WSL: install mise inside Ubuntu on WSL and use jruby/truffleruby there
  3. If you must stay on native Windows, install the engine with its own installer outside mise and keep it out of mise.toml
  4. Guard shared mise.toml files per-OS with environment-specific config (e.g. mise.windows.toml) so Windows machines get MRI and unix machines get the engine

Example fix

# before (mise.toml, on Windows)
[tools]
ruby = "jruby-9.4.9.0.0"

# after
# mise.windows.toml
[tools]
ruby = "3.3.6"

# mise.toml (unix hosts)
[tools]
ruby = "jruby-9.4.9.0.0"
Defensive patterns

Strategy: validation

Validate before calling

# guard installs of engine-prefixed ruby on Windows before calling mise:
case "$OSTYPE" in msys*|cygwin*|win32*) case "$RUBY_REQ" in jruby-*|truffleruby-*|rbx-*) echo "use WSL or MRI on Windows"; exit 1;; esac;; esac
mise install "ruby@$RUBY_REQ"

Prevention

When it happens

Trigger: Running `mise use jruby-9.4.9.0.0`, `mise install truffleruby-24.1.1`, or any request whose ToolVersion string is an engine-prefixed version on a Windows host. Also triggered by a mise.toml/[tools] entry like `ruby = "jruby-9.4""` on Windows.

Common situations: A cross-platform team's mise.toml pins an app to jruby/truffleruby and a Windows teammate runs `mise install`; migrating from asdf configs that listed engine-prefixed versions; scripts assuming unix behavior run on Windows CI (GitHub Actions windows-latest).

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/06dba78bcee2fe8e. Report an issue: GitHub.