ios - 运行 sudo gem install fastlane -NV 会抛出错误安装 fastlane rubyzip 需要 ruby 版本 >= 2.4 时
问题描述
跑步
sudo gem install fastlane -NV
安装 fastlane rubyzip requires ruby version >= 2.4 时抛出错误
最初,环境设置是通过运行以下步骤完成的 -
如果已安装,请先卸载 rvm -
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
解决方案
通过将 ruby 版本更改为 2.6.0 进行修复,如下所示 -
rbenv install 2.6.0
rbenv global 2.6.0
Then -
sudo gem install fastlane -NV
推荐阅读
- tensorflow - 如何在tensorflow2.0的keras模型中使用tf.train.ExponentialMovingAverage
- tfs - 在 TFS 2018 构建中显示 CFML CFLint 结果总结
- haskell - 可以用 `fold/foldl` 和 `f` 等价地定义`foldMap f` 吗?
- regex - 正则表达式或子句与我想要的不匹配
- android - Flutter - 使用 ACTION_EDIT 意图时出现 PlatformException
- r - 使用 R dplyr 整理数据框
- javascript - 调度后调用函数?(还原)
- python - NaN 出现在 Python 中 Tukey 的 HSD 的结果中
- ios - AppStoreConnect:页面上有一个或多个错误 - 没有突出显示错误
- python - 尝试使用已关闭的 ZIP 存档