Mobile Fastlane

Install Ruby (Windows)

Last updated 2026-10-07

Set up Ruby, DevKit and Bundler on Windows so you can run fastlane locally. This follows the approach the official Ruby installation guide recommends for Windows: RubyInstaller.

Step 1: Install Ruby with DevKit

Ruby 3.4 + DevKit (RubyInstaller)3.4.x

fastlane is a Ruby gem. DevKit compiles gems with native extensions on Windows.

winget install RubyInstallerTeam.RubyWithDevKit.3.4
Verify: ruby --version
Pick the “WITH DEVKIT” x64 installer, and let it run “ridk install” at the end.
Official install guide

Download Ruby+Devkit 3.4.x (x64) from rubyinstaller.org. Choose the with DevKit package, not the plain one. Many gems that fastlane depends on contain native C extensions, and DevKit (based on MSYS2) provides the compiler toolchain to build them.

  1. 1

    Run the installer

    Accept the license, keep Add Ruby executables to your PATH and Associate .rb files checked.
  2. 2

    Keep the MSYS2 component selected

    On the component page, leave MSYS2 development toolchain ticked.
  3. 3

    Run ridk install

    On the last page, keep Run 'ridk install' checked and click Finish. A console window opens. Press Enter to accept the default option.
C:\Ruby34-x64\bin\ridk.cmd
_____ _ _____ _ _ _ _
| __ \ | | |_ _| | | | | | | |
| |__) | _| |__ _ _ | | _ __ ___| |_ __ _| | | ___ _ __
| _ / | | | '_ \| | | | | | | '_ \/ __| __/ _` | | |/ _ \ '__|
| | \ \ |_| | |_) | |_| |_| |_| | | \__ \ || (_| | | | __/ |
|_| \_\__,_|_.__/ \__, |_____|_| |_|___/\__\__,_|_|_|\___|_|
__/ | _
|___/ _|_ _ __ | | o __ _| _ _
| (_)| |^| | | |(_|(_)\^/_>
 
1 - MSYS2 base installation
2 - MSYS2 system update (optional)
3 - MSYS2 and MINGW development toolchain
 
? Which components shall be installed? If unsure press ENTER [1,3]
❯ 1,3
MSYS2 seems to be properly installed
Install MINGW development toolchain succeeded
The ridk install prompt shown at the end of RubyInstaller. Press Enter to accept [1,3].

Step 2: Verify Ruby

Close every open PowerShell / Command Prompt window, so the new PATH is picked up. Then open a new PowerShell:

Windows PowerShell
PS C:\my-app> ruby --version
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x64-mingw-ucrt]
PS C:\my-app> gem --version
3.6.2
PS C:\my-app> where.exe ruby
C:\Ruby34-x64\bin\ruby.exe
Note: if where.exe ruby lists more than one path, the first one wins. Remove older Ruby installations from PATH so Windows uses the Ruby you just installed.

Step 3: Verify DevKit/MSYS2

Windows PowerShell
PS C:\my-app> ridk version
---
ruby:
path: C:/Ruby34-x64
version: 3.4.1
platform: x64-mingw-ucrt
msys2:
path: C:\Ruby34-x64\msys64
cc: gcc (Rev2, Built by MSYS2 project) 14.2.0
PS C:\my-app> ridk exec pacman --version
.--. Pacman v7.0.0 - libalpm v15.0.0

You don't need to install extra MSYS2 packages at this point. If a gem later fails with "Failed to build gem native extension", run ridk install again and choose option 3.

Step 4: Update RubyGems

Windows PowerShell
PS C:\my-app> gem update --system
Updating rubygems-update
Successfully installed rubygems-update-3.6.2
RubyGems system software updated

Step 5: Install Bundler

fastlane recommends running through Bundler and a Gemfile, so every developer and every CI machine uses exactly the same versions (fastlane: use a Gemfile).

Windows PowerShell
PS C:\my-app> gem install bundler
Successfully installed bundler-2.6.2
1 gem installed
PS C:\my-app> bundle --version
Bundler version 2.6.2
Note: fastlane 2.240.1 requires Bundler >= 2.4 and < 5.0.

Step 6: Add a .ruby-version file

Add a .ruby-version file in your project root. Version managers (rbenv, asdf) and CI actions such as ruby/setup-ruby read it to select the same Ruby.

.ruby-version
3.4.1

Next steps

Official documentation

Was this helpful?