Fastlane error - bare IOS bundler issue

OK, I am installing the right bundler, but in Fastlane I am getting an error. Very strange.

Creating Gymfile
Gymfile created
[stderr] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' (2.2.33) required by your /Users/expo/workingdir/build/TheClub/Gemfile.lock. (Gem::MissingSpecVersionError)
[stderr] To update to the latest version installed on your system, run `bundle update --bundler`.
[stderr] To install the missing version, run `gem install bundler:2.2.33`
[stderr] Checked in 'GEM_PATH=/Users/expo/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information
[stderr] 	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
[stderr] 	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
[stderr] 	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
[stderr] 	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
[stderr] 	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:304:in `block in activate_bin_path'
[stderr] from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in `synchronize'
[stderr] 	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
[stderr] 	from /usr/local/bin/fastlane:23:in `<main>'
Error: Your project requires another version of bundler, you can change it in the build profile in eas.json by specifying the version under key "bundler"

It is installing 2.2.33 in eas.json.

{
  "cli": {
    "version": ">= 0.48.2",
    "requireCommit": true
  },
  "build": {
    "production": {
      "yarn": "1.22.18",
      "node": "16.14.0",
      "distribution": "store",
      "android": {
        "image": "latest",
        "buildType": "app-bundle"
      },
      "ios": {
        "image": "latest",
        "cocoapods": "1.11.2",
        "bundler": "2.2.33",
        "buildConfiguration": "Release"
      }
    },
    "development": {
      "extends": "production",
      "distribution": "internal",
      "android": {
        "image": "latest",
        "gradleCommand": ":app:assembleRelease",
        "buildType": "apk"
      },
      "ios": {
        "image": "latest",
        "cocoapods": "1.11.2",
        "bundler": "2.2.27",
        "buildConfiguration": "Debug"
      }
    },
    "preview": {
      "extends": "production",
      "distribution": "internal"
    }
  },
  "submit": {
    "production": {}
  }
}

Still I am already installing the right bundler.

Here is additional info

Bundler version 2.2.33
remove Gemfile
install
Fetching gem metadata from https://rubygems.org/
.
.
.
.
.
.
.
.
Resolving dependencies...
Using rexml 3.2.5
Using concurrent-ruby 1.1.10
[stderr] Following files may not be writable, so sudo is needed:
[stderr]   /usr/local/lib/ruby/gems/2.7.0/build_info
[stderr]   /usr/local/lib/ruby/gems/2.7.0/cache
[stderr]   /usr/local/lib/ruby/gems/2.7.0/doc
[stderr]   /usr/local/lib/ruby/gems/2.7.0/extensions
[stderr]   /usr/local/lib/ruby/gems/2.7.0/gems
[stderr]   /usr/local/lib/ruby/gems/2.7.0/plugins
[stderr]   /usr/local/lib/ruby/gems/2.7.0/specifications
Using zeitwerk 2.5.4
Using public_suffix 4.0.6
Using httpclient 2.8.3
Using atomos 0.1.3
Using bundler 2.2.33
Using claide 1.1.0
Using fuzzy_match 2.0.4
Using nap 1.1.0
Using netrc 0.11.0
Using ffi 1.15.5
Fetching json 2.6.1
Fetching minitest 5.15.0
Using cocoapods-deintegrate 1.0.5
Using cocoapods-downloader 1.6.2
Using cocoapods-search 1.0.1
Using cocoapods-try 1.2.0
Using colored2 3.1.2
Using escape 0.0.4
Using fourflusher 2.3.1
Using gh_inspector 1.1.3
Using molinillo 0.8.0
Using ruby-macho 2.5.1
Using nanaimo 0.3.0
Using CFPropertyList 3.0.5
Using i18n 1.10.0
Using tzinfo 2.0.4
Using addressable 2.8.0
Using cocoapods-plugins 1.0.0
Using cocoapods-trunk 1.6.0
Using ethon 0.15.0
Using typhoeus 1.4.0
Using xcodeproj 1.21.0
Installing json 2.6.1 with native extensions
Installing minitest 5.15.0
Using activesupport 6.1.5
Using algoliasearch 1.27.5
Fetching cocoapods-core 1.11.3
Installing cocoapods-core 1.11.3
Fetching cocoapods 1.11.3
Installing cocoapods 1.11.3
Bundle complete! 1 Gemfile dependency, 38 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.22
  - RUBY VERSION: 2.7.5 (2021-11-24 patchlevel 203) [x86_64-darwin21]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /Users/expo/.local/share/gem/ruby/2.7.0
  - RUBY EXECUTABLE: /usr/local/opt/ruby@2.7/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/2.7.0/bin
  - SPEC CACHE DIRECTORY: /Users/expo/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby@2.7/2.7.5/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-darwin-21
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/2.7.0
     - /Users/expo/.local/share/gem/ruby/2.7.0
     - /usr/local/Cellar/ruby@2.7/2.7.5/lib/ruby/gems/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /var/folders/h2/gp9wlkv11lg0qj6y2mnqgc_40000gn/T/yarn--1648677314776-0.93202370046011
     - /Users/expo/workingdir/build/TheClub/node_modules/.bin
     - /Users/expo/.config/yarn/link/node_modules/.bin
     - /Users/expo/.nvm/versions/node/v16.14.0/libexec/lib/node_modules/npm/bin/node-gyp-bin
     - /Users/expo/.nvm/versions/node/v16.14.0/lib/node_modules/npm/bin/node-gyp-bin
     - /Users/expo/.nvm/versions/node/v16.14.0/bin/node_modules/npm/bin/node-gyp-bin
     - /Users/expo/.nvm/versions/node/v16.14.0/bin
     - /Users/expo/.nvm/versions/node/v16.13.2/bin
     - /usr/local/lib/ruby/gems/2.7.0/bin
     - /usr/local/opt/ruby@2/bin
     - /usr/local/opt/ruby/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
Done in 5.50s.

OK I had a Gemfile in my directory and deleted that (react-native init has it) and it started working!

Checking other things now.

1 Like

Thanks for following up with your findings, @billnbell!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.