Fastlane step failing to run due to "rbenv: version `ruby-2.4.1' is not installed"

#1

Using Xcode 11.5.x, on macOS 10.15.4 (Catalina)

±-----------------------------------------------------------------------------+

| (0) fastlane@2.7 |
±-----------------------------------------------------------------------------+
| id: fastlane |
| version: 2.7.1 |
| collection: https://github.com/bitrise-io/bitrise-steplib.git |
| toolkit: go |
| time: 2020-07-09T03:27:24Z |
±-----------------------------------------------------------------------------+
| |
Config:

  • WorkDir: /Users/vagrant/git
  • Lane: createIpa
  • UpdateFastlane: true
  • VerboseLog: true
  • EnableCache: true
  • GemHome:
    Expand WorkDir
    Expanded WorkDir: /Users/vagrant/git
    $ rbenv “versions”
    rbenv: version ruby-2.4.1' is not installed (set by /Users/vagrant/git/.ruby-version) system 2.4.5 2.5.3 2.6.5 Connected Apple Developer Portal Account found, exposing FASTLANE_SESSION env var Session exported Determine desired Fastlane version Gem lockfile does not exist Update system installed Fastlane $ gem "install" "fastlane" "--no-document" rbenv: versionruby-2.4.1’ is not installed (set by /Users/vagrant/git/.ruby-version)
    Command failed, error: exit status 1
    | |
    ±–±--------------------------------------------------------------±---------+
    | x | fastlane@2.7 (exit code: 1) | 4.88 sec |
    ±–±--------------------------------------------------------------±---------+
    | Issue tracker: https://github.com/bitrise-io/steps-fastlane/issues |
    | Source: https://github.com/bitrise-io/steps-fastlane |
    ±–±--------------------------------------------------------------±---------+
0 Likes

#2

Hi @mjoe!

This might be happening because of the hidden .ruby-version file in your project. You can either remove this file completely or just add the following script step:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

rm ~/git/.ruby-version

That should solve it.

0 Likes

#3

Thank you!!!

1 Like

closed #4

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

0 Likes