Matching Fastlane Version Required

With the new xcode version 11.7.0 environment, we seem to have to match the exact version of fastlane to get fastlane commands to work. Here’s an example output of when our Gemfile.lock had fastlane version 2.158.0 but the environment seemed to want 2.159.0 specifically. Is there anything we can do where the environment will use the version of fastlane our Gemfile.lock specifies?

Fastlane Log:
[⠋] :rocket: [⠙] :rocket: [⠹] :rocket: [⠸] :rocket: [⠼] :rocket: [⠴] :rocket: [⠦] :rocket: [⠧] :rocket: [⠇] :rocket: [:heavy_check_mark:] :rocket:
[02:43:04]: Sending anonymous analytics information
[02:43:04]: Learn more at https://docs.fastlane.tools/#metrics
[02:43:04]: No personal or sensitive data is sent.
[02:43:04]: You can disable this by adding opt_out_usage at the top of your Fastfile
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
[02:43:05]: -----------------------------
[02:43:05]: — Step: update_fastlane —
[02:43:05]: -----------------------------
[02:43:05]: Looking for updates for fastlane…

Looking for related GitHub issues on fastlane/fastlane…

:arrow_right: Precheck fails (undefined method `copyright’ for nil:NilClass (NoMethodError))
https://github.com/fastlane/fastlane/issues/17176 [open] 2 :speech_balloon:
a day ago

:arrow_right: undefined method `get_app_info_localizations’ for nil
https://github.com/fastlane/fastlane/issues/17208 [open] 0 :speech_balloon:
15 hours ago

:arrow_right: undefined method `noecho’ for #<IO:>
https://github.com/fastlane/fastlane/issues/17114 [open] 1 :speech_balloon:
a week ago

and 593 more at: https://github.com/fastlane/fastlane/search?q=undefined%20method%20`[]'%20for%20Gem%3A&type=Issues&utf8=✓

:link: You can ⌘ + double-click on links to open them directly in your browser.

#######################################################################

fastlane 2.159.0 is available. You are on 2.158.0.

You should use the latest version.

Please update using bundle update fastlane.

#######################################################################

2.159.0 Improvements

  • [spaceship] add skip_select_team to Spaceship::ConnectAPI.login (#17215) via Josh Holtz
  • [Fastlane.swift] Swift Package Manager support (#16844) via Jorge
  • [actions] fixing an issue where last_git_tag command sometimes didn’t return the correct tag based on pattern when the commit has multiple tags applied (#17204) via Gligor Kotushevski
  • [match] fixed an issue that caused match import command to create wrong names for some provisioning profiles. (#17213) via Nikola Nikolov
  • [deliver] fix UploadMetadata taking too long to run (#17169) via Pierluigi D’Andrea
  • [snapshot] fix snapshot landscape orientation issue (#17180) via Jari Kalinainen
  • [spaceship] fix Spaceship::ConnectAPI.get_app_price_points (#17200) via Josh Holtz

Please update using bundle update fastlane
bundler: failed to load command: fastlane (/Users/distiller/.gem/ruby/2.7.1/bin/fastlane)
NoMethodError: [!] undefined method []' for #<Gem::NameTuple fastlane, 2.159.0, ruby> /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/actions/update_fastlane.rb:51:in block in run’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/actions/update_fastlane.rb:50:in each' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/actions/update_fastlane.rb:50:in run’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in execute_action’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/runner.rb:229:in chdir’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/runner.rb:229:in execute_action' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing' Fastfile:13:in parsing_binding’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/fast_file.rb:61:in eval' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/fast_file.rb:61:in block in parse’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/fast_file.rb:50:in chdir' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/fast_file.rb:50:in parse’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/fast_file.rb:40:in initialize' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/lane_manager.rb:15:in new’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/lane_manager.rb:15:in cruise_lane' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/commands_generator.rb:108:in block (2 levels) in run' /Users/distiller/.rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in call’
/Users/distiller/.rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in run' /Users/distiller/.rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in run_active_command’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!' /Users/distiller/.rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in run!’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/commands_generator.rb:352:in run' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/commands_generator.rb:41:in start’
/Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in take_off' /Users/distiller/.gem/ruby/2.7.1/gems/fastlane-2.158.0/bin/fastlane:23:in <top (required)>’
/Users/distiller/.gem/ruby/2.7.1/bin/fastlane:23:in load' /Users/distiller/.gem/ruby/2.7.1/bin/fastlane:23:in <top (required)>’

@drewbratcher I wouldn’t advise using the built in updater for fastlane as it has been a bit buggy in the past. It would be better to define fastlane in a Gemfile and use bundler to install it, for example: https://circleci.com/docs/2.0/testing-ios/#adding-a-gemfile

I would also advise when working with Gems to use one of the Rubies we provide to chruby instead of the system Ruby. The system Ruby is fairly locked down and generally just causes issues.