pderichs / sublime_rubocop

A Sublime Text RuboCop plugin.
238 stars 41 forks source link

Wrong ruby executable taken, when using with rvm. #53

Closed RaimundHuebel closed 7 years ago

RaimundHuebel commented 7 years ago
General Infos
Problem & Fix:

When using SublimeLinter-rubocop the Linter always use 'ruby' to execute rubocop, whereas SublimeLinter-RubyLinter has detected rvm-auto-ruby as executable.

# The problematic line is (in linter.rb):
class RuboCop(RubyLinter):
    ...
    def cmd(self):
        ...
        command = ['ruby', '-S', 'rubocop', '--format', 'emacs']  #Here ... ruby is hardcoded.

# better would be:
    command = self.executable_path + ['-S', 'rubocop', '--format', 'emacs']

With kind regards, Raimund

RaimundHuebel commented 7 years ago

Ups, i have currently seen, that this is the wrong repository. It was meant to SublimeLinter/SublimeLinter-rubocop. Will close this issue.