- Downloads
- RubyInstallers Archives
- with Devkit
- without Devkit
- Other Useful Downloads
- 7-Zip Archives
- PGP signature key
- Which version to download?
- How to update?
- RubyInstaller-head
- With Development Kit?
- Speed and Convenience
- Documentation
- Support
- The easy way to install Ruby on Windows
- Latest News
- RubyInstaller 3.0.0-1 released
- RubyInstaller 2.7.2-1, 2.6.6-2 and 2.5.8-2 released
- RubyInstaller 2.7.1-1, 2.6.6-1, 2.5.8-1 and 2.4.10-1 released
- RubyInstaller 2.7.0-1 released
- RubyInstaller 2.6.5-1, 2.5.7-1 and 2.4.9-1 released
- Is RubyInstaller for you?
- Learn Ruby
- Online Ruby Programming Course
- Online Rails Programming Course
- Ethical hacking and penetration testing
- InfoSec, IT, Kali Linux, BlackArch
- How to install and use Ruby on Windows
- Why install Ruby
- How to install Ruby on Windows
- How to update Ruby on Windows
- How to install and use gem on Windows
- How to install bundler
- How to install the Ruby program on Windows. How to run a Ruby program on Windows
- Recovering sites from the Internet Archive in Windows
- How to Install WhatWeb on Windows
- How to install WPScan on Windows
- What is MSYS2. How to use MSYS2
- How to configure Ruby as an Apache module on Windows
Downloads
RubyInstallers Archives
Not sure what version to download? Please read the right-hand column for recommendations.
with Devkit
- Ruby+Devkit 3.0.0-1 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 3.0.0-1 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.7.2-1 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.7.2-1 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.6.6-2 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.6.6-2 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.5.8-2 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.5.8-2 (x86)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.4.10-1 (x64)
- download PGP signature
- SHA256:
- Ruby+Devkit 2.4.10-1 (x86)
- download PGP signature
- SHA256:
without Devkit
- Ruby 3.0.0-1 (x64)
- download PGP signature
- SHA256:
- Ruby 3.0.0-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x86)
- download PGP signature
- SHA256:
Other Useful Downloads
7-Zip Archives
- Ruby 3.0.0-1 (x64)
- download PGP signature
- SHA256:
- Ruby 3.0.0-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.7.2-1 (x86)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.6.6-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x64)
- download PGP signature
- SHA256:
- Ruby 2.5.8-2 (x86)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x64)
- download PGP signature
- SHA256:
- Ruby 2.4.10-1 (x86)
- download PGP signature
- SHA256:
PGP signature key
Which version to download?
If you don’t know what version to install and you’re getting started with Ruby, we recommend that you use the Ruby+Devkit 2.7.X (x64) installer. It provides the biggest number of compatible gems and installs the MSYS2 Devkit alongside Ruby, so gems with C-extensions can be compiled immediately. The 32 bit (x86) version is recommended only if custom 32 bit native DLLs or COM objects have to be used.
How to update?
Ruby can be updated to the latest patch version (e.g. from 2.6.1 to 2.6.4) by running the new installer version. Installed gems are not overwritten and will work with the new version without re-installation. It’s sufficient to use the RubyInstaller without Devkit for these update installations. The Devkit can be updated separately using the ridk install command.
If the new Ruby version is from a different stable branch, then please use a new target directory for installation. That is to say, a previous RubyInstaller-2.6.x installation should not be updated by installing RubyInstaller-2.7.x into the same directory. This is because gems with C extensions are not compatible between ruby-2.6 and 2.7. Find out more in the FAQ.
RubyInstaller-head
RubyInstaller-head is a daily-updated version of the Ruby development branch. It can be used for continuous integration tests (CI) on your gems or applications, so you’re prepared for upcoming changes to the Ruby core. Builds are available on stable download URIs in the github release section. They can be easily integrated into Appveyor.
With Development Kit?
RubyInstaller uses the MSYS2 toolchain as its development kit. It is bundled into the Ruby+Devkit installer version as a selectable component, so that no additional downloads/installs are required. It’s possible to share one Devkit among multiple versions of Ruby.
MSYS2 is required in order to build native C/C++ extensions for Ruby and is necessary for Ruby on Rails. Moreover it allows the download and usage of hundreds of Open Source libraries which Ruby gems often depend on.
The MSYS2 development environment can be activated in a running cmd or powershell console by ridk enable . This adds commands like make , gcc , pacman or sh to the search path. See more in the Wiki.
Speed and Convenience
RubyInstaller is compiled with the latest GCC at the release date. The installed Ruby is a native Windows application but combines this with the rich UNIX toolset of MSYS2 and the large repository of MINGW libraries.
Read more about RubyInstaller and its alternatives here.
Documentation
The Ruby core- and standard library documentation are included as part of the installation. We also recommend the online documentation, or the HTML version downloadable from ruby-doc.org.
Support
Enjoy! Happy Ruby-coding! And let us know what you think, or if you have any issues, at our helpful and friendly RubyInstaller Google Group.
The easy way to install Ruby on Windows
This is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
Latest News
RubyInstaller 3.0.0-1 released
RubyInstaller-3.0.0-1 has been released! It features a whole bunch of great new features and improvements. See the ruby-3.0.0 release post for more details.
RubyInstaller 2.7.2-1, 2.6.6-2 and 2.5.8-2 released
RubyInstaller versions 2.7.2-1, 2.6.6-2 and 2.5.8-2 are released. These are maintenance releases with bug and security fixes.
RubyInstaller 2.7.1-1, 2.6.6-1, 2.5.8-1 and 2.4.10-1 released
RubyInstaller versions 2.7.1-1, 2.6.6-1, 2.5.8-1 and 2.4.10-1 are released. These are maintenance releases with bug and security fixes.
RubyInstaller 2.7.0-1 released
RubyInstaller-2.7.0-1 has been released. See the ruby-2.7.0 release post and the the RubyInstaller CHANGELOG for more details. Please note, that some gems are not yet compatible with Ruby-2.7 on Windows. You should therefore stay on 2.6 until 2.7 is well supported, unless you want to contribute and fix remaining issues.
RubyInstaller 2.6.5-1, 2.5.7-1 and 2.4.9-1 released
RubyInstaller versions 2.6.5-1, 2.5.7-1 and 2.4.9-1 are released. These are maintenance releases with bug and security fixes.
Is RubyInstaller for you?
RubyInstaller is the easiest and most widely-used Ruby environment on Windows. And Ruby is a great language for beginners as well as professionals. It’s suitable for small scripts as well as large applications. RubyInstaller combines the possibilities of native Windows programs with the rich UNIX toolset of MSYS2 and the large repository of MINGW libraries. RubyInstaller is a great foundation for using Ruby for development and production … Read more
Learn Ruby
Online Ruby Programming Course
If you’re new to Ruby, check out this online course from The Pragmatic Studio to learn all the fundamentals of object-oriented programming with Ruby.
Online Rails Programming Course
If you’re looking to create Ruby on Rails web apps, you’ll learn how to build a complete Rails 4 app step-by-step in this online course also from The Pragmatic Studio.
Ethical hacking and penetration testing
InfoSec, IT, Kali Linux, BlackArch
How to install and use Ruby on Windows
Why install Ruby
Ruby is a scripting language, that is, pre-compilation is not required to run programs. In this sense, Ruby is an analogue of PHP, Python, PERL and others.
Ruby is a fairly popular language and many interesting programs are written on it; in scope of InfoSec, the well-known WPScan, WhatWeb, Wayback Machine Downloader and others can be cited as examples.
By installing Ruby on Windows, you can run programs written in this language, as well as learn this programming language and write your own scripts.
By the way, Ruby, like PHP, Python and PERL, can be a web server module, and scripts written in this language can be used as backend of a website or service.
How to install Ruby on Windows
There you will see many installer options that differ not only in versions, but also in the composition of the downloaded files. Executable files are self-contained installers for Windows that include the Ruby language, runtime, important documentation, and more. If you do not know which version to install in order to get started with Ruby, the Ruby+Devkit * (x64) is recommended. It provides the largest number of compatible gem (Ruby packages) and installs MSYS2-Devkit along with Ruby, so gem with C-extensions can be compiled immediately after installation.
Run the downloaded file. In this window we can select the settings:
The installation folder can be left unchanged.
Add Ruby executables to your PATH – means adding a directory with Ruby executables to the system variable. This is recommended to do for in future to avoid specifying the full path to the script interpreter each time the Ruby script is run.
Associate .rb and .rbw files with Ruby installation. Thanks to this, Ruby files can be launched by double-clicking or by typing the name of the script on the command line.
Use UTF-8 as default external encoding.
I selected all three checkmarks and entered C:\Ruby26 as the installation folder:
As you can see on the next page, the Ruby package itself takes up a bit of space, but the MSYS2 development toolkit offered for installation takes up a lot of space. I highly recommend installing MSYS2 because, in addition to the ability to compile packages for Ruby mentioned above, MSYS2 provides a console environment with Linux features (something like Cygwin does, but with additional features).
Leave a checkmark on the last window to configure the MSYS2 developer tools and click Finish.
Further we are offered:
Just press ENTER to complete all three actions:
Everything is completed, to exit, press ENTER:
By the way, if you carefully watched what was happening on the screen, you might notice pacman. There really is a pacman package manager in this console environment. We will return to other functions of MSYS2 a bit later.
How to update Ruby on Windows
To upgrade to the latest patch (that is, the minor version, for example from 2.5.1 to 2.5.4), it is enough to launch a new version of the installer. Installed gem (packages from the Ruby repository) are not overwritten and will work with the new version without reinstalling. To upgrade the installation, just use RubyInstaller without Devkit. You can update Devkit separately by running the following command at the Windows command prompt:
When a new major version is released, it cannot be updated by installing it in the same directory as the previous one. For example, if the previous version of the installation is RubyInstaller-2.5.x, and the new version is RubyInstaller-2.6.x, then you need to install it either in a new directory or delete the old version and install a new one instead, since gem (programs) with C extensions are not compatible between ruby-2.5 and 2.6.
How to install and use gem on Windows
RubyGems is a package manager for Ruby. Using it, you can install various programs and their dependencies, installation can be done both from the source code on the local system, and from remote application sources.
The Ruby installation shown above also installs gem:
You should see gem help.
To display all available gem commands, run:
To install the package, run a command of the form:
More examples of installing packages will follow.
To show help about the installation command:
For example, to install the ‘rake’ program from a local directory or a remote server:
Installing the ‘rake’ package only from a remote server:
Installing ‘rake’, but only version 0.3.1, even if there are unsatisfied dependencies, do the installation in the user directory:
List gem (packages) whose name begins with ‘D’:
List local and remote gem whose name contains ‘log’:
The previous command is used to search for packages by name.
List only remote (non-local) gem whose name contains ‘log’:
View information about RubyGems:
Update all gem programs in the system:
Update local version of RubyGems:
How to install bundler
bundler is a Ruby dependency manager. This manager is useful when installing other programs written in Ruby.
To install bundler on Windows, run:
To upgrade bundle, run the command:
If you install the program from the source code and there is a Gemfile file, then go to the folder with this program and run the command in it:
This command will install all the dependencies listed in the Gemfile.
To see where gem packages are installed using bundle, use the command:
How to install the Ruby program on Windows. How to run a Ruby program on Windows
The following are a few examples of installing and using Ruby programs on Windows.
Recovering sites from the Internet Archive in Windows
Let’s start with the Wayback Machine Downloader program, which completely restores sites from the web archive.
To install Wayback Machine Downloader, just do:
To check the operability of the program, run site restoration from the Internet Archive:
The program successfully completed the work:
How to Install WhatWeb on Windows
WhatWeb identifies websites. The purpose of this program is to answer the question “What is this website?”. WhatWeb recognizes web technologies, including a content management system (CMS), blogging platforms, statistics/analytics packages, JavaScript libraries, a web server and embedded devices. WhatWeb has over 1700 plugins, each of which is for recognizing one or the other. WhatWeb also identifies version numbers, email addresses, account IDs, web platform modules, SQL errors and more.
Let’s start by searching WhatWeb in the Ruby package repository:
Only simple_whatweb found (0.4.1).
Even if it’s WhatWeb, the version is very old. Therefore, on Windows, install WhatWeb from the source code.
Unzip this folder. Open a command prompt and navigate to this folder:
Run the command:
The following command will show the help for the program:
Run the site check:
How to install WPScan on Windows
To install and run WPScan on Windows is tricky a bit, so the tutorial was divided in separate article “How to Install and Run WPScan on Windows”.
What is MSYS2. How to use MSYS2
We have already installed MSYS2 in order to gain access to compilation tools, thanks to which we can install any Ruby package. In fact, MSYS2 is based on Cygwin and contains a large number of Linux utilities.
MSYS2 provides a shell for bash, Autotools, make, gcc, pacman, sh, and many other packages. Of particular note is the pacman package manager.
To activate the MSYS2 working environment, open a command prompt or powershell console and run there:
As a result, many Linux utilities will immediately become available for work, as well as the Pacman package manager, with which you can install new packages or update existing ones. When installing packages, Pacman monitors the dependencies and installs them.
To update all packages:
To search for a package:
To list all available packages:
How to configure Ruby as an Apache module on Windows
Ruby scripts can be run in an Apache environment similar to running PHP scripts. To do this, you need to make a little configuration.
I installed the web server according to this tutorial, if you installed according to another manual, then edit the paths to fit your environment.
Open the httpd.conf file for editing, I have it located on the path C:\Server\bin\Apache24\conf\httpd.conf.
Find the line there
and add ExecCGI to it. You should get the following line (ATTENTION: you may have different the set of options):