Tuesday, 29 April 2025

How to install and set up Ruby on Windows ?

💎 How to Install and Set Up Ruby on Windows – Beginner’s Guide

If you’re looking to dive into Ruby development but you're on a Windows machine, no worries—you can absolutely make it work! In this blog post (paired with the video below 🎥), I’ll walk you through the complete process of installing and setting up Ruby on Windows.

Let’s get started!


🔥 Why Ruby?

Ruby is a clean, elegant programming language that's super popular for building web apps (hello, Ruby on Rails!), scripting, automation, and even some data-related tasks.

Even though it’s traditionally a bit more “at home” on Linux and MacOS, it runs just fine on Windows with the right setup.

🛠️ Step 1: Download RubyInstaller

  1. Head to the official RubyInstaller for Windows.

  2. Click Download and choose the latest stable version (for example, Ruby 3.x.x).

  3. Make sure you pick the correct architecture (64-bit for most modern machines).

The RubyInstaller packages Ruby along with a development kit (DevKit) which you’ll need for building native gems later.


🖥️ Step 2: Install Ruby

  1. Run the installer you downloaded.

  2. Check the box "Add Ruby executables to your PATH" — super important!

  3. Keep the defaults for the installation path.

  4. (Optional but recommended) Check "Run ridk install" at the end of setup to install MSYS2 and development tools.

âś… Adding Ruby to PATH allows you to run Ruby commands from any terminal window.


đź§° Step 3: Install MSYS2 (Development Kit)

If you chose to "run ridk install" earlier, you’ll see a prompt to install MSYS2.

  • Select option 3 (MSYS2 and MINGW development toolchain) and press Enter.

  • It will automatically download and install essential build tools needed by many Ruby gems.