SublimeLinter / SublimeLinter-rubocop

SublimeLinter 3 plugin for Ruby, using rubocop.
MIT License
159 stars 40 forks source link

Not working with latest sublime text #78

Closed bmadone closed 2 years ago

bmadone commented 2 years ago

Hi, I installed the latest sublime text, and want to run rubocop with it, but I have a problem.

I use rvm, ruby is 3.0.2, rubocop installed globally, so it's available from console when I typed 'rubocop', also I have ruby linter, and it works as expected, but rubocop does not work, I don't know why he cannot find any errors. What potentially can go wrong?

My ruby is 3.0.2, rubocop available globally

Path to rubocop is /Users/user/.rvm/rubies/ruby-3.0.2/bin/rubocop

In my console I got this SublimeLinter: WARNING: rubocop cannot locate 'rubocop'

Ruby linter work well, do you have any suggestion on what can wrong? Thanks for attention

bmadone commented 2 years ago

When I add this to settings image

I have this error


env: ruby_executable_hooks: No such file or directory
bmadone commented 2 years ago

Fixed

First

# make sure I'm in the global gemset
$ rvm gemset use global
# install the gem
$ gem install rubocop

Then


    "linters": {
        "rubocop": {
            "executable": "/Users/Dmytro_Moisieiev/.rvm/gems/ruby-3.0.2@global/wrappers/rubocop"
        }
    }
}
kaste commented 2 years ago

This should probably just work "out-of-the-box" if https://github.com/SublimeLinter/SublimeLinter/issues/1795 gets implemented.