Successfully Installing Ruby on Rails (RoR) on Windows 11: A Dev Team’s Journey

Ruby on Rails, often referred to as Rails, is a powerful web application framework built using the Ruby programming language. It follows the Model-View-Controller (MVC) design pattern and emphasizes “convention over configuration,” making it particularly friendly and efficient for developers to work with.

Developers love Rails for its elegance, rapid development capabilities, and vast ecosystem of gems (libraries). Whether you’re building an MVP, a full-scale SaaS app, or just experimenting with backend APIs, Rails provides a clean and opinionated structure to work with.

However, if you’re on Windows 11, installing Ruby on Rails can be a bit of a roller coaster. Between missing dependencies, path mismatches, and environment configuration chaos, it’s not always straightforward, especially when compared to Unix-based systems like macOS or Linux.

This blog captures our dev team’s real-world experience. We hit roadblocks, scratched our heads, but finally found a stable and repeatable way to install and run Ruby on Rails smoothly on Windows 11.

👉 New to Rails? Learn What is Ruby on Rails & Why Use it for Web Application?

2. Common Challenges Faced

When we set out to install Ruby on Rails on Windows 11, we underestimated the complexity. Here’s a rundown of the hurdles we encountered:

Compatibility Issues

Many Ruby and Rails dependencies are optimized for Unix-like systems. Windows 11, with its different file system and process handling, often throws errors during gem installations or when running the Rails server.

Environment Setup Complexities

Configuring the PATH environment variable and ensuring tools like Node.js, Yarn, and Ruby worked well together was trickier than expected. We frequently ran into version mismatches.

Missing Dependencies

Gems like nokogiri, psych, ffi, and pg require native extensions, which often fail to compile without the correct development tools or libraries installed.

On Windows, we also face the tzinfo gem cannot find a valid timezone data source on your Windows system. On Linux/macOS, this data usually exists at locations like /usr/share/zoneinfo, but on Windows, it’s not present by default.

Permissions and Path Conflicts

Windows 11’s security settings and User Account Control (UAC) caused permission errors when installing gems or accessing certain directories. Incorrect PATH settings also led to “command not found” errors.

These issues left us frustrated, but after trial and error, we pieced together a process that worked consistently. Below, we share the exact steps, complete with code snippets and resources.

3. Final Working Installation Steps (That Actually Worked!)

After trial and error, here’s the exact sequence that worked flawlessly for us. This guide assumes a fresh Windows 11 installation and will help avoid 90% of typical issues.

Step 1: Install Node.js

Node is required for Rails’ JavaScript runtime (Webpack, ESBuild, etc.).

Download Node.js (LTS

node -v      // To check the node version.
npm -v       // To check the npm version.

Step 2: Install Yarn (Optional but recommended)

Yarn helps with managing JavaScript dependencies in Rails projects using Webpacker or similar tools.

Yarn Windows Install Guide

Once installed, verify:

yarn -v // To check the yarn version.

Step 3: Install Ruby + DevKit

Use the official RubyInstaller with MSYS2 toolchain support (v3. x recommended).

RubyInstaller Archives

Choose a version like:

▪️Ruby 3.2.x (with DevKit)

During installation, make sure you check:

▪️Add Ruby executables to your PATH
▪️Run ridk install (to install MSYS2 toolchain)

Verify:

ruby -v // Checks the Ruby version.
gem -v // Checks if the gem is ready or not.

Then run:

ridk install

Choose option 3 (Install MSYS2 and development toolchain).

Step 4: Install Rails

We recommend using the RailsInstaller for a bundled installation of Ruby, Rails, and essential dependencies:

Download RailsInstaller

This simplifies setup, especially for beginners or those unfamiliar with environment configurations.

Alternatively, if you already have Ruby configured, you can manually install Rails via gem:

gem install rails

Verify installation:

rails -v

Step 5 (Optional): Install PostgreSQL and pgAdmin

If your app uses PostgreSQL, install both:

PostgreSQL Download

During setup:

▪️Set a password for the postgres user (you’ll use it in database.yml)
▪️Install pgAdmin for GUI database management

After installation, confirm:

psql --version

Step 6: Create a New Rails App

rails new app-name
cd app-name

If you want to add API and database configuration at the time of creating an app:

rails new app-name --database=postgresql --api
cd app-name

Or, clone an existing repo:

git clone <your_repo_url>
cd your_project

Step 7: Install Gems Using Bundler

bundle install

Make sure Bundler is installed:

gem install bundler

Step 8: Configure Database

Edit config/database.yml to use PostgreSQL:

default: &default

  adapter: postgresql

  encoding: unicode

  host: localhost

  username: postgres

  password: your_password

  pool: 5

development:

  <<: *default

  database: your_db_name

Then create the DB:

rails db:create

Step 9: Restore from a PostgreSQL Dump (Optional)

pg_restore --verbose --clean --no-acl --no-owner --host=localhost --username=postgres --dbname=your_db_name path/to/dump_file.dump

Step 10: Run Database Migrations

rails db:migrate

Step 11: Start the Rails Server

rails s

Open your browser and go to:

http://localhost:3000

Fix Rails Installation Issues Now Having Trouble?

Get instant solutions to common setup problems.

4. Key Tips and Lessons Learned

Use the Right Terminal

Use Git Bash or PowerShell. CMD is fine for basic use, but we faced fewer permission issues and better Ruby behavior in Git Bash.

Editor of Choice

We recommend Visual Studio Code for Windows. Install the Ruby, Rails, and Solargraph extensions for code completion and syntax support.

Avoid Conflicting Ruby Versions

Stick to one Ruby version and ensure you’re not mixing system vs custom installations. Use where ruby to check if multiple versions exist.

Update database.yml Carefully

This file caused the most issues during cloning and DB restoration. Ensure:

▪️Proper spacing (YAML is sensitive)

▪️Correct credentials

▪️No tabs, only spaces!

Bundle Gems as Admin (if needed)

Sometimes bundle install throws permission errors. Use:

bundle install --path vendor/bundle

Or run Git Bash as an administrator.

5. Visual Aids

Rails Installation Flow (Windows 11)

Start

  ↓

Install Node.js → Install Yarn (Optional)

  ↓

Install Ruby + DevKit → run `ridk install`

  ↓

Install Rails via RailsInstaller or `gem install rails`

  ↓

Install PostgreSQL + pgAdmin (if needed)

  ↓

Create or clone a Rails app

  ↓

Configure DB & run migrations

  ↓

Run Rails server

Rails Architecture on Windows

[Client Browser]

      ↓

[Rails App – Controller]

      ↓

[Model ↔ Database (PostgreSQL)]

      ↓

[View → HTML Response]

database.yml Setup Snapshot

development:

  adapter: postgresql

  encoding: unicode

  database: dev_db

  pool: 5

  username: postgres

  password: secret

  host: localhost
coma

Conclusion

Getting Ruby on Rails running on Windows 11 is possible, but it requires careful steps and a few lessons from the trenches. Our dev team’s initial frustration gave way to a working solution that now serves as our official onboarding guide for Windows developers.

While many developers traditionally prefer Ubuntu or macOS for Rails development—largely due to the challenges of setting it up on Windows—we hope this guide helps change that perception. With the right configuration, you can enjoy the power of Rails without leaving the comfort of your Windows OS.

Whether you’re prototyping or contributing to a large Rails codebase, this setup will save you time, avoid dependency nightmares, and help you focus on building features.

We’d love to hear from you! If you encounter a unique setup issue or discover a helpful tweak, drop a comment or share your experience. Let’s make Rails on Windows smoother for everyone.

Keep Reading

Keep Reading

Join Us for Your 24/7 Clinical Knowledge Partner – The AI Companions Webinar on Thursday, 10th July 2025 at 11:00 AM EDT

Register Now
  • Service
  • Career
  • Let's create something together!

  • We’re looking for the best. Are you in?