question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

couldn't find rubocop for formatting (ENOENT)

See original GitHub issue

Your 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

  1. Install couldn’t find rubocop for formatting (ENOENT)
  2. Set “ruby.format”: “rubocop”
  3. 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:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

11reactions
amaelftahcommented, Aug 1, 2018

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" }

8reactions
goodforevercommented, Oct 17, 2018

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found