SublimeLinter / SublimeLinter-rubocop

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

Not working in Sublime #62

Closed AlbertMontolio closed 5 years ago

AlbertMontolio commented 6 years ago

I have followed your instructions:

Adding "args": ["--config", "path/to/config.yml"],

to the settings of Sublime Linter

But I get

screen shot 2018-08-13 at 09 48 08

Rubocop(erred).

Any ideas what might be wrong?

kaste commented 6 years ago

Hi!

Please enable debug mode in your user settings. Open View > Console and look at the output.

AlbertMontolio commented 6 years ago

In the debug mode I get:

ApplySyntax: Syntax set to Ruby on Rails using Packages/Rails/Ruby on Rails.sublime-syntax
SublimeLinter: WARNING: rubocop output:
/usr/bin/ruby: no Ruby script found in input (LoadError)

I checked this thread in github:

https://github.com/asdf-vm/asdf/issues/64

They do a hack with the path, but I am kind of new and I don't really grasp what they do.

Here is my path

export PATH="./bin:./node_modules/.bin:${PATH}:/usr/local/sbin"
kaste commented 6 years ago

Hm, you're not in debug mode yet which will be relatively verbose. Please open and edit Preferences: SublimeLinter Settings (best to use Sublime's command palette ctrl+shift+p)

It looks like it uses the standard /usr/bin/ruby though. You may have to look at setting executable to /path/to/my/real/ruby.

A bit related if you use rvm -> https://github.com/SublimeLinter/SublimeLinter/issues/1479

braver commented 5 years ago

Closed due to inactivity