If you’re on Windows, you can still develop with Ruby and Rails . Let’s walk through your options and the steps involved.
There are two main options:
️ Option A: Use WSL (Recommended)
WSL stands for Windows Subsystem for Linux — it lets you run a full Linux environment on Windows without dual-booting or using a virtual machine.
Best for: Developers who want a smooth Rails experience and compatibility with Linux tools.
Steps to Set Up Rails with WSL
- Install WSL
wsl --install
This will install Ubuntu by default. - Update and install dependencies inside Ubuntu terminal
sudo apt update && sudo apt upgrade sudo apt install curl git build-essential libssl-dev libreadline-dev zlib1g-dev
- Install Ruby (using a version manager like rbenv or rvm)
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-installer | bash echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc rbenv install 3.3.0 rbenv global 3.3.0
- Install Rails
gem install rails
- Verify installations
ruby -v rails -v
️ Option B: Use RubyInstaller for Windows (Native Ruby)
If you don’t want to use WSL, you can install Ruby directly in Windows.
Steps for Native Windows Setup
- Download Ruby Installer
Go to: https://rubyinstaller.orgDownload a version likeRuby+Devkit 3.3.X
. - Run the Installer
- Make sure you check the box that says “Add Ruby executables to your PATH”.
- Choose to run
ridk install
after installation (this installs DevKit, MSYS2).
- Install Rails
Open Command Prompt or PowerShell and run:gem install rails
- Check Versions
ruby -v rails -v
Note: Some gems (e.g.,
pg
for PostgreSQL) can be tricky to install on native Windows due to compilation issues. That’s why WSL is highly recommended.
Database Setup for Windows
- SQLite is supported out of the box.
- PostgreSQL: Download from https://www.postgresql.org/download/windows/
- You’ll need to install the dev libraries if using native Ruby (which can be difficult).
Common Tools
Tool | Windows Option |
---|---|
Ruby | RubyInstaller OR rbenv via WSL |
Rails | gem install rails |
Git | Git for Windows |
Code Editor | VS Code |
Terminal (WSL) | Ubuntu app from Microsoft Store |
Summary: Which Setup is Best?
Setup | Pros | Cons |
---|---|---|
WSL | Most compatible, Linux-like environment | Slightly more setup effort |
RubyInstaller | Simple to install, native Windows | Compatibility issues with some gems/tools |
Recommendation: Use WSL + Ubuntu for the best Rails development experience on Windows.
More Posts
Topshelf Soft Pack Joints – Mac1 (Hybrid)
Topshelf Soft Pack Joints – Mac1 (Hybrid)
Topshelf Soft Pack Joints – Mac1 (Hybrid)
Topshelf Soft Pack Joints – Mac1 (Hybrid)
Topshelf Soft Pack Joints – Mac1 (Hybrid)