standardrb / vscode-standard-ruby

The official VS Code extension for the Standard Ruby linter and code formatter
Other
101 stars 7 forks source link

Unsupported standard version: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux] (>= 1.24.3 required) #22

Closed RamonGiovane closed 5 months ago

RamonGiovane commented 5 months ago

I'm getting this message when I start the VSCode extension. The weird thing is 2.7.1 >= 1.24.3. The Output tab in the console also shows this:

[client] Disabling because the extension does not support this version of the standard gem.
[client]   Version reported by `/home/ramon/.asdf/shims/ruby -v`: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux] (>= 1.24.3 required)
RamonGiovane commented 5 months ago

Well, I have find out what was wrong and I will report the solution here because I found the error message a little confusing. So if anyone is having the same problem or similar like in #4 , here's what I did:

I found out that I had set the Standard Ruby: Command Path configuration wrong. I was passing the path to the ruby executable instead of the path to the standard gem.

image The fixed config

It is also confusing that we install the gem with:

gem install standard

but its executable command is

standardrb

So first I had to find out the path of the gem using

which standardrb