Closed nhinds closed 8 years ago
Hi, I think this is not due to relative path settings. I have only absolute path and I'm experiencing the same issue. Here is my plugin config :
{
"rubocop_command": "bundle exec /usr/local/bin/rubocop --auto-correct --format simple -D"",
"check_for_rvm": false,
"rvm_auto_ruby_path": "",
"check_for_rbenv": false,
"rbenv_path": "",
"mark_issues_in_view": false,
"show_auto_correct_warning": true,
"rubocop_config_file": ""
}
Am I missing something in plugin config ?
traceback is the same :
Running / u s r / l o c a l / b i n / r u b o c o p / U s e r s / p g l / d e v e l o p p e m e n t / p u b l i p o s t a g e / l i b / p u b l i p o s t a g e . r b
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 533, in run_
return self.run(**args)
File "exec in /Applications/Sublime Text.app/Contents/MacOS/Packages/Default.sublime-package", line 200, in run
FileNotFoundError: [Errno 2] No such file or directory: 'foldername'
I noticed that the foldername
in trackback above had nothing to see with the folder I am working in.
So I clean up folder list, restarted SublimeText, and all is working fine now.
I had to add absloute path for rubucop
executable in config (rubocop_command
) to be sure that bundle
will find the exec.
HTH
This bug is about relative paths in the .sublime-project
file, which you did not include in your comment.
Based off your description I suspect you did have a relative path in your sublime project, but when you cleaned up your folder list it may have been removed
I have sublime text project files with relative paths to folders, which look like:
When rubocop is run on these, I get an error about rubocop trying to use the relative folder path as its working directory:
Editing the project to specify an absolute path to the folder seems to work fine, but I'd prefer to keep using paths relative to the project root.