Install Ruby on Windows 11

Contents
RubyInstaller option
Run the installer with MSYS2 toolchain
ruby -v
gem update --system

RubyInstaller option

Windows 11 does not include Ruby by default, so you add it with a standalone installer. For beginners the common choice is RubyInstaller, mentioned here as plain text so you can search for it by name.

Pick the 64 bit build for a modern laptop and stay with the defaults unless you have a clear reason to change them. The defaults place Ruby where the installer expects it and register it for the current user.

Run the installer with MSYS2 toolchain

Run the installer and move through the pages with Next. Keep the install location and file association options selected so scripts open with Ruby.

Near the end you will see an option to install the MSYS2 toolchain. Leave it selected and let the extra terminal window finish. That toolchain provides build tools that some gems need later.

ruby -v

Open a fresh terminal after the install finishes, then check what was installed with one short command:

Show the installed Ruby version

ruby -v

ruby 3.3.0 (2023-12-25 revision 7b0c32346b) [x64-mingw-ucrt]

You will see the word ruby followed by the version number and build details. If the terminal answers that the command was not found, close the terminal and open it again so the new settings take effect.

gem update --system

Ruby ships with a package tool called gem. The gem update --system command refreshes that tool itself, so many guides suggest running it once after a fresh install.

On Windows run the terminal as administrator if the update asks for extra rights. If everything already works, you can also leave the update for later and continue with the course.

Next: Install Ruby on Ubuntu

Article author: Arthur Isaev

Related articles
Ruby
Ruby course: zero to hero in 50 lessons
What is Ruby and where it runs
Install Ruby and check the version
irb: the interactive shell
Your first Ruby script
Variables
Numbers
Strings
Symbols
Truthiness: only false and nil
Conditions
Loops
Arrays
Hashes
Ranges
Methods
Blocks, procs, lambdas
String tools
Files and IO
Exceptions
Modules and mixins
Classes and objects
Inheritance
Enumerables
Duck typing and core idioms
Gems and Bundler
Testing with Minitest
Debugging
Encodings
Time and date
JSON and YAML
HTTP clients
Sockets
REST APIs
puts, print and p
Metaprogramming
Enumerators
Pattern matching
Arguments: splats and kwargs
Rake tasks
Environment and CLI
Logging
CSV
ERB templates
WEBrick server
Rails in one lesson
Capstone: todo CLI
Capstone: JSON API
Performance
Modern Ruby tour
Hero roadmap: the whole course on one page
Install Ruby on Windows 11
Install Ruby on Ubuntu
Install Ruby on Rocky Linux
Install Ruby on macOS
Install Ruby on FreeBSD
Ruby in Docker
Threads and fibers

Search this site

Channel @aofeed Chat @aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su, info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: