简体   繁体   中英

running sudo gem install fastlane -NV throws the error installing fastlane rubyzip requires ruby version >= 2.4 when

running

sudo gem install fastlane -NV 

throws the error installing fastlane rubyzip requires ruby version >= 2.4 when

Initially, environment setup was done by running the following steps -

First uninstall rvm if it is installed -

rvm -v 
rvm list
rvm uninstall {version_to_uninstall}
rvm use system - Switch to macOS default ruby version
rvm implode - uninstall rvm 

rbenv - Ruby Environment Manager - we will use this to install ruby
brew install rbenv ruby-build
rbenv install 2.3.7

Add the following line to .bash_profile - 
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

source ~/.bash_profile
rbenv global 2.3.7
ruby -v 

bundle install
bundle exec fastlane bootstrap 
open ProjectName.xcworkspace

Fixed by changing ruby version to 2.6.0 as follows -

rbenv install 2.6.0

rbenv global 2.6.0

Then - 

sudo gem install fastlane -NV

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM