In a Rails app I have started seeing the following in logs and test outputs.
warning: parser/current is loading parser/ruby25, which recognizes
warning: 2.5.5-compliant syntax, but you are running 2.5.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
This is coming from Rubocop.
I had understood that Rubocop checks whether a .ruby-version file exists in the app root and uses the Ruby version it specifies. https://rubocop.readthedocs.io/en/latest/configuration/#setting-the-target-ruby-version
The Rails app contains such a file
/.ruby-version
ruby-2.5.3
Why is Rubocop running checks against the wrong version of Ruby?
It's coming from parser, a dependency of rubocop.
https://github.com/whitequark/parser/blob/master/lib/parser/current.rb
Looking at this code it seems that if you are not using the last minor version of Ruby you're getting this warning.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With