couldn't find rubocop for formatting (ENOENT)
See original GitHub issueYour environment
c
version: 0.18.0- Ruby version: 2.4.1
- VS Code version: Version 1.25.1 (1.25.1)
- Operating System: MacOS
- Hardware (optional):
Make sure you have ruby
, ruby-debug-ide
and ruby-debug-basex19
installed before submitting your issue – thank you !
Expected behavior
Formatting should work
Actual behavior
Shows: couldn’t find rubocop for formatting (ENOENT) on window reload
Steps to reproduce the problem
- Install couldn’t find rubocop for formatting (ENOENT)
- Set “ruby.format”: “rubocop”
- Reload window
rubocop gem is installed with gem install rubocop
and which rubocop
shows: /Users/vedmant/.rvm/gems/ruby-2.5.1/bin/rubocop
I couldn’t find a way to specify path for rubocop
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
ruby - rubocop on VScode not working.Error ... - Stack Overflow
Thanks! I tried $ which rubocop , then rubocop not found , when $ rbenv which rubocop , then Users/user/. rbenv/versions/2.5.
Read more >How to format rubocop on vscode? : r/ruby - Reddit
I decided to learn ruby on vscode, but the rubocop is not working. The code appears to be correct, but those lines below...
Read more >VScodeでrubyファイルのフォーマットができない - Teratail
「couldn't find rubocop.bat for formatting (ENOENT)」 などのように出てきます。 なんどインストールをやり直しても同じ状況で、困っています。
Read more >Class: RuboCop::ResultCache Private - Doc Index
Return a hash of the options given at invocation, minus the ones that have no effect on which offenses and disabled line ranges...
Read more >vscode-solargraph - Bountysource
[Error - 10:24:00 PM] Request textDocument/formatting failed. Message: [Bundler::GemNotFound] Could not find racc-1.5.2 in any of the sources Code: -32603.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
can you try to add this settings to vscode , as i think this is what’s used in the source code
"ruby.lint.rubocop" : { "exe" : "/Users/vedmant/.rvm/gems/ruby-2.5.1/bin/rubocop" }
same error, and after I set “ruby.lint.rubocop” : { “exe” : “/Users/vedmant/.rvm/gems/ruby-2.5.1/bin/rubocop” } I got another error: rubocop failed with code=127