RubyInstaller is a free Windows distribution from the RubyInstaller Team for running Ruby programs and developing Ruby applications. It combines the interpreter, RubyGems, Bundler, interactive tools, and reference material with Windows integration. An optional MSYS2 Devkit supplies the compiler environment that native extensions need. The installer uses an open-source BSD license; bundled components retain their own licenses.
Ruby at the command line
The Ruby interpreter executes program files, while IRB accepts expressions interactively and displays their results. Its session can evaluate calculations, call methods, and retain values in variables. RubyInstaller’s console menu opens IRB or a command prompt with the Ruby environment available.
Managing gem libraries
RubyGems manages reusable libraries and their commands. Users search for a gem, retrieve it with its dependencies, inspect the local gem list, or remove a package. Ruby code loads a library through require, which adds the gem’s library directory to the search path.
A project’s dependency set
Bundler reads the gems and constraints in a project’s Gemfile. When no lockfile exists, it resolves the dependency set, obtains the gems, and records their versions in Gemfile.lock. Subsequent runs reuse those choices when the Gemfile remains unchanged.
When project requirements change, Bundler can resolve the affected dependencies while preserving other choices. Its local mode works from available gem caches rather than contacting the remote repository. That mode cannot discover a platform-specific gem that exists only online.
Which gems need the Devkit
The package’s compiler requirements depend on the gem’s contents:
- Pure Ruby gems run through the interpreter without a native compilation step.
- Compatible Windows binary gems provide their native extensions in advance and can use the plain Ruby distribution.
- Source gems with C extensions need a build environment. Ruby+Devkit provides MSYS2 and MINGW tools to compile those extensions.
The base toolchain does not contain every external library a gem might need. Pacman retrieves additional MSYS2 packages and their libraries. A gem can declare these dependencies in its metadata; RubyInstaller then requests them before building the extension.
The runtime selects the MINGW package architecture from the active Ruby process. Only MINGW packages supply libraries that the extension can link against. If Pacman fails, the runtime prints its error but continues the gem operation.
Tools within the current shell
The ridk helper manages the MSYS2 environment from Command Prompt or PowerShell. Its enable command exposes tools such as gcc, make, sh, and pacman in the running console. Disable removes that environment setup. Exec runs an individual command with the corresponding MSYS2 variables, while version reports the RubyInstaller and MSYS2 components.
Several Ruby installations can share one Devkit. Changes in MSYS2 can nevertheless introduce incompatibilities with older Ruby environments.
Finding dependent DLLs
RubyInstaller separates executable lookup from DLL lookup. The ordinary PATH does not control DLL searches inside the Ruby process. RUBY_DLL_PATH supplies additional directories at startup. A runtime function can add a directory immediately, optionally only during a block of Ruby code. That function’s changes do not carry into subprocesses.
Selecting another Ruby environment
The ridk use command finds installations in the Windows registry or reads paths from a configuration file. Users choose a runtime interactively, by index, or through a matching expression. The selection affects the current shell; separate options make it the user’s default or the system default.
System-wide changes require administrator permission. A system PATH entry can also take precedence over a user setting. Different Ruby branches need separate runtime directories and their own gem installations. Existing native extensions cannot simply transfer between those branches.
Shared computers and portable folders
An all-users installation lets ordinary accounts read the common Ruby runtime. Administrators can maintain gems centrally. When the central gem directory is not writable, RubyInstaller redirects gem installation to a private user directory. Pacman still needs permission to modify its own package location.
Portable command stubs
The portable archive runs from its folder without automatic Start-menu entries, file associations, or PATH changes on the target computer. Its command stubs launch Ruby tools directly. A nearby MSYS2 directory can supply the Devkit for that portable environment.
Local reference material
Optional HTML documentation covers Ruby’s core and standard library, and the console menu opens it in a browser. The RI command retrieves reference material for local gems. A separate menu option starts a local gem-documentation server, obtaining its server components when necessary.





