Open soundasleep opened 7 years ago
@soundasleep this linter uses rvm
by default. You can override this on your user settings for the RuboCop sublime package.
Since I use rbenv
, here's my RuboCop.sublime-settings
:
{
"check_for_rvm": false,
"check_for_rbenv": true,
"rbenv_path": "/usr/local/bin/rbenv" // The path to your rbenv's binary. Run `which rbenv` to get it.
}
If anyone wants to know the path of the rubocop settings:
I added the above hash as @rebagliatte suggested to User setting file. But that not seems to be working. I am using Sublime Text 3
For anyone reading this in the future, this is what worked for me:
which rvm-auto-ruby
Voila! Headache averted! Hope this helps someone!!
It seems to be related to the mark_issues
part in my case (I'm using rbenv
):
File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 46, in update_marks
File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 128, in do_in_file_check
File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 121, in mark_issues
File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_listener.py", line 114, in run_rubocop
File "/path/to/sublime-3/Installed Packages/RuboCop.sublime-package/rubocop_runner.py", line 50, in run
File "./python3.3/subprocess.py", line 819, in __init__
File "./python3.3/subprocess.py", line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.rvm/bin/rvm-auto-ruby'
and I'm using this configuration:
{
"mark_issues_in_view": true,
"check_for_rvm": false,
"check_for_rbenv": true,
"show_auto_correct_warning": false,
"rbenv_path": "~/.rbenv/bin/rbenv",
"rubocop_config_file": "./.rubocop.yml"
}
Same error on sublime text 3 here by the way, but rubocop seems to be working with the config from rebagliatte
I've installed the Sublime Text 2 Rubocop plugin but it's failing to check any file. When I run "Rubocop: Check current file", I get the following error:
rubocop --version
on my shell works fine.Is there a way to configure this plugin with Sublime Text 2 to not use rvm? Or to configure the command that's run?