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.

README for executePath doesn't match behavior in code

See original GitHub issue

From the readme:

{
  // If not specified searches for 'rubocop' executable available on PATH (default and recommended)
  "ruby.rubocop.executePath": "",

From the code:

https://github.com/misogi/vscode-ruby-rubocop/blob/664e19bd104dd96d914c3e4d03f6f872a41830a5/src/rubocop.ts#L39

if (!this.path || 0 === this.path.length) {
            vscode.window.showWarningMessage('execute path is empty! please check ruby.rubocop.executePath config');

See also https://github.com/Microsoft/vscode/issues/26832 so now I get this warning on every single ruby tab I open.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:6
  • Comments:9

github_iconTop GitHub Comments

13reactions
AndrewRayCodecommented, Aug 8, 2017

If I do which rubocop and set the path to that directory, I now get the warnings in every tab:

"ruby.rubocop.executePath": "/Users/me/.rvm/gems/ruby-2.1.5@repo/bin/"

env: ruby_executable_hooks: No such file or directory

If I make it the file itself:

"ruby.rubocop.executePath": "/Users/me/.rvm/gems/ruby-2.1.5@repo/bin/rubocop"

/Users/me/.rvm/gems/ruby-2.1.5@repo/bin/rubocop + rubocop is not executable

What is the correct way to configure this plugin? The instructions and warnings don’t make sense.

2reactions
trejo08commented, Feb 27, 2018

if you exec this command from your shell: user@your_computer:$~/which rubocop

that command will return something like this: /Users/your_user/.rvm/gems/ruby-2.3.1@global/bin/rubocop

you could copy that path and paste in your vscode config file as the value of the key that mentioned above:

{
  // If not specified searches for 'rubocop' executable available on PATH (default and recommended)
  "ruby.rubocop.executePath": "/Users/your_user/.rvm/gems/ruby-2.3.1@global/bin/",
}

ensure that you have installed rubocop in the specific gemset that you are putting in the vscode config file

by the example I used RVM, I have installed ruby 2.3.1 and I’m using the global gemset

Read more comments on GitHub >

github_iconTop Results From Across the Web

fatal: pathspec 'README.txt' did not match any files
I'm trying to create a new file, via the 'git add README.txt' command in terminal... git add does not create a new file....
Read more >
User and Workspace Settings - Visual Studio Code
All features of the Settings editor such as settings groups, search, and filtering behave the same for Workspace settings. Not all User settings...
Read more >
Readme for IBM WebSphere MQ for HP NonStop Server ...
This readme provides information for IBM WebSphere MQ for HP NonStop Server, Version 5.3.1, Fix Pack 11.
Read more >
Puppeteer documentation - DevDocs
Puppeteer is a Node library which provides a high-level API to control Chromium or Chrome over the DevTools Protocol. The Puppeteer API is...
Read more >
Error Pages - ReadMe Documentation
Set up Redirects and error codes. ... Say your product pops up an error code. ... Regexes must be a complete match, not...
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