Updating fastlane fails: signet requires Ruby version >= 2.4.0

gdingenen picture gdingenen · Oct 10, 2019 · Viewed 7.3k times · Source

I'm unable to update fastlane.

When I execute fastlane update_fastlane I get the following error.

ERROR:  Error installing fastlane:
signet requires Ruby version >= 2.4.0.

When I execute ruby -v I get ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]

I'm stuck at fastlane version 2.28.3. I have tried reinstalling fastlane but I still get the same error.

What can be the cause of this issue? How can I resolve this?

Answer

user2767514 picture user2767514 · Oct 15, 2019

Use this approach.

Remove fastlane from homebrew. Open terminal and run:

brew cask uninstall fastlane

Install ruby environments. Run in terminal:

brew install rbenv ruby-build
echo "" >> ~/.bash_profile
echo 'export PATH=${HOME}/homebrew/bin:${PATH}' >> ~/.bash_profile
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
rbenv install 2.6.5
rbenv global 2.6.5
exit

Open terminal again and run:

gem install fastlane
fastlane -v

Inspiration form: https://hackernoon.com/the-only-sane-way-to-setup-fastlane-on-a-mac-4a14cb8549c8