5

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:

Part 1 Part 2(error) 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.

NicolasElPapu
  • 1,612
  • 2
  • 11
  • 26
  • Please, post code as code and error messages as text, not as a photograph of code or a photograph of the error. This is a site for programmers, [Photography.se] is over there. We want to copy&paste&read&run&debug your code and read the error message, not critique its use of color and perspective. – Jörg W Mittag Nov 09 '19 at 08:31
  • 2
    @JörgWMittag If you read the question, you can see that i posted code as code and error messages as text, the "fastlane metrics" command is not in code, because again, if you read the question you can see that you would have to follow the tutorial in order for that command to work for you. Any more suggestions? – NicolasElPapu Nov 09 '19 at 17:32

1 Answers1

9

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

NicolasElPapu
  • 1,612
  • 2
  • 11
  • 26
  • 3
    Author of the linked article here. Thanks for reading it, trying it, and sharing the issue and resolution for the greater good of the community. – Nish Nov 28 '19 at 16:23