Install Ruby (Windows)
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
fastlane is a Ruby gem. DevKit compiles gems with native extensions on Windows.
winget install RubyInstallerTeam.RubyWithDevKit.3.4ruby --versionDownload 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
Run the installer
Accept the license, keep Add Ruby executables to your PATH and Associate .rb files checked. - 2
Keep the MSYS2 component selected
On the component page, leave MSYS2 development toolchain ticked. - 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.
_____ _ _____ _ _ _ _| __ \ | | |_ _| | | | | | | || |__) | _| |__ _ _ | | _ __ ___| |_ __ _| | | ___ _ __| _ / | | | '_ \| | | | | | | '_ \/ __| __/ _` | | |/ _ \ '__|| | \ \ |_| | |_) | |_| |_| |_| | | \__ \ || (_| | | | __/ ||_| \_\__,_|_.__/ \__, |_____|_| |_|___/\__\__,_|_|_|\___|_| __/ | _ |___/ _|_ _ __ | | 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,3MSYS2 seems to be properly installedInstall MINGW development toolchain succeededStep 2: Verify Ruby
Close every open PowerShell / Command Prompt window, so the new PATH is picked up. Then open a new PowerShell:
PS C:\my-app> ruby --versionruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x64-mingw-ucrt]PS C:\my-app> gem --version3.6.2PS C:\my-app> where.exe rubyC:\Ruby34-x64\bin\ruby.exewhere.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
PS C:\my-app> ridk version---ruby: path: C:/Ruby34-x64 version: 3.4.1 platform: x64-mingw-ucrtmsys2: path: C:\Ruby34-x64\msys64cc: gcc (Rev2, Built by MSYS2 project) 14.2.0PS C:\my-app> ridk exec pacman --version .--. Pacman v7.0.0 - libalpm v15.0.0You 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
PS C:\my-app> gem update --systemUpdating rubygems-updateSuccessfully installed rubygems-update-3.6.2RubyGems system software updatedStep 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).
PS C:\my-app> gem install bundlerSuccessfully installed bundler-2.6.21 gem installedPS C:\my-app> bundle --versionBundler version 2.6.2Step 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.
3.4.1Next steps
Official documentation
- RubyInstallerRubyInstaller for Windows (with DevKit)rubyinstaller.org/
- RubyInstalling Rubywww.ruby-lang.org/en/documentation/installation/
- BundlerBundler: getting startedbundler.io/guides/getting_started.html
- fastlaneUse a Gemfile (recommended setup)docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile