我在 Medium 上完成了本教程,以便将我的 Xcode 项目与 SonarQube
集成以获得一些指标.我还发现有人在这里有类似的问题,但没有答案:类似问题
如果我跑:
nicolas$ ruby --version
我得到的是ruby版本2.6.3
,高于要求的2.3
ruby 2.6.3p62(2019-04-16 修订版 67580)[universal.x86_64-darwin19]
有谁知道如何解决这个问题,或者有任何预感吗?提前致谢,感谢您的帮助.
在摸索了好几个解决方案后,终于解决了这个问题.发生的事情是我最初使用以下命令安装了 Fastlane
:
brew cask install Fastlane
似乎它使用的是另一个版本的 ruby,而我有一个新版本.所以我卸载了它:
brew cask 卸载 Fastlane
然后我用这个命令重新安装了它:
sudo gem install -n/usr/local/bin fastlane -NV
因为我遇到了权限问题,然后一切正常.
参考和其他解决方案:
Github 线程
usr/local/bin
I finished this tutorial on Medium in order to integrate my Xcode project with SonarQube
to have some metrics. Setup SonarQube - Swift. I was able to make it through the last step that is: running fastlane metrics
on the terminal while being in the root of the project directory. But I get this error on step "slather".
nokogiri requires Ruby version >= 2.3.0., fastlane finished with errors:
I have also found that someone had a similar question here, but no answers: Similar Question
If I run:
nicolas$ ruby --version
I get ruby version 2.6.3
, which is higher than the required 2.3
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
Does anyone knows how to fix this, or got any hunches? Thanks in advance, I appreciate any help.
After digging around and trying several solutions, I finally solved this. What happened was that I initially installed Fastlane
with this command:
brew cask install Fastlane
And it seems that it was using another version of ruby while I had a newer one. So I uninstalled it with:
brew cask uninstall Fastlane
And then I re-installed it with this command:
sudo gem install -n /usr/local/bin fastlane -NV
Because I was having problems with permissions and then all worked good.
References and other solutions:
Github thread
usr/local/bin
这篇关于Fastlane “nokogiri 需要 Ruby 版本 >= 2.3.0."错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!