{"record":{"id":"06dba78bcee2fe8e","repo":"jdx/mise","slug":"ruby-engine-is-not-supported-on-windows-only","errorCode":null,"errorMessage":"Ruby engine '{}' is not supported on Windows.\nOnly standard MRI Ruby versions can be installed via RubyInstaller2.","messagePattern":"Ruby engine '(.+?)' is not supported on Windows\\.\nOnly standard MRI Ruby versions can be installed via RubyInstaller2\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/ruby_windows.rs","lineNumber":229,"sourceCode":"                body.trim()\n                    .trim_start_matches(\"ruby-\")\n                    .trim_start_matches('v')\n                    .to_string()\n            }\n        };\n        if v.is_empty() {\n            return Ok(vec![]);\n        }\n        Ok(vec![v])\n    }\n\n    async fn install_version_(\n        &self,\n        ctx: &InstallContext,\n        mut tv: ToolVersion,\n    ) -> eyre::Result<ToolVersion> {\n        if !super::ruby_common::is_mri_version(&tv.version) {\n            bail!(\n                \"Ruby engine '{}' is not supported on Windows.\\n\\\n                 Only standard MRI Ruby versions can be installed via RubyInstaller2.\",\n                tv.version\n            );\n        }\n        let tarball = self.download(&tv, ctx.pr.as_ref()).await?;\n        self.verify_checksum(ctx, &mut tv, &tarball)?;\n        self.install(ctx, &tv, &tarball).await?;\n        self.verify(ctx, &tv).await?;\n        self.install_rubygems_hook(&tv)?;\n        self.test_gem(&ctx.config, &tv, ctx.pr.as_ref()).await?;\n        if let Err(err) = self\n            .install_default_gems(&ctx.config, &tv, ctx.pr.as_ref())\n            .await\n        {\n            warn!(\"failed to install default ruby gems {err:#}\");\n        }\n        Ok(tv)","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/plugins/core/ruby_windows.rs#L211-L247","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Use a standard MRI version on Windows: `mise use ruby@3.3` (plain version, no engine prefix)","Run the alternative engine under WSL: install mise inside Ubuntu on WSL and use jruby/truffleruby there","If you must stay on native Windows, install the engine with its own installer outside mise and keep it out of mise.toml","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"],"exampleFix":"# before (mise.toml, on Windows)\n[tools]\nruby = \"jruby-9.4.9.0.0\"\n\n# after\n# mise.windows.toml\n[tools]\nruby = \"3.3.6\"\n\n# mise.toml (unix hosts)\n[tools]\nruby = \"jruby-9.4.9.0.0\"","handlingStrategy":"validation","validationCode":"# guard installs of engine-prefixed ruby on Windows before calling mise:\ncase \"$OSTYPE\" in msys*|cygwin*|win32*) case \"$RUBY_REQ\" in jruby-*|truffleruby-*|rbx-*) echo \"use WSL or MRI on Windows\"; exit 1;; esac;; esac\nmise install \"ruby@$RUBY_REQ\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep engine-prefixed ruby versions out of the shared mise.toml; put them in OS-specific config (mise.toml vs mise.windows.toml)","On Windows, default shared configs to plain MRI versions","If a project requires jruby/truffleruby, document a WSL workflow rather than fighting the native Windows path"],"tags":["ruby","windows","engine-support","rubyinstaller","install"],"backgroundTag":"unsupported-platform-arch","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}