Mobile Fastlane

Create the Gemfile

Last updated 2026-10-07

The Gemfile declares exactly which gems the project uses. Bundler resolves them once and writes the result to Gemfile.lock, so everyone runs the same fastlane. Create <project-root>/Gemfile:

Gemfile
source "https://rubygems.org"
gem "fastlane", "2.240.1"
plugins_path = File.join(File.dirname(__FILE__), "fastlane", "Pluginfile")
eval_gemfile(plugins_path) if File.exist?(plugins_path)
# Ruby 3.4 removed these from the default standard library
gem "bigdecimal"; gem "logger"; gem "benchmark"; gem "mutex_m"; gem "nkf"; gem "net-smtp"; gem "fiddle"

Why this structure?

LinePurpose
gem "fastlane", "2.240.1"Pins fastlane to the version the framework is tested with. Upgrade deliberately, not by accident.
eval_gemfile(plugins_path)Loads fastlane/Pluginfile, where fastlane manages plugins. This is the layout from Using fastlane plugins.
bigdecimal, logger, …Ruby 3.4 moved these out of the default gems. Without them fastlane fails to load with a LoadError.
Tip: React Native projects already ship a Gemfile with CocoaPods pins (cocoapods, activesupport, xcodeproj). Keep those lines and add the fastlane lines below them.

Official documentation

Was this helpful?