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.

Hi,

I am trying to use have VS Code run rubocop when I save.

There are in my workspace settings json file:

"ruby.rubocop.executePath": "/home/sathya/.rvm/bin/rvm-auto-ruby "

When I save however, I get this message:

/home/sathya/.rvm/bin/rvm-auto-ruby rubocop is not executable

If I open the terminal type rvm use 2.3 and then rubocop in the terminal, rubocop works fine. What should I do to get vscode-ruby-rubocop running properly without errors on saving?

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
jimsynzcommented, May 16, 2017

Hey all. I worked around this by creating a shell script called rubocop. I put it in ~/.vscode/bin for convenience and changed the execute path to the same.

#!/bin/bash

export PATH="$PATH:~/.rvm/bin"
source ~/.rvm/scripts/rvm

cd `dirname $1`
exec bundle exec rubocop $@
11reactions
misogicommented, Nov 17, 2016

I tested with rvm. these configs works fine.

"ruby.rubocop.executePath": "" or delete “ruby.rubocop.executePath” config (use default == search $PATH) or "ruby.rubocop.executePath": "/Users/you/.rvm/gems/ruby-2.3.2/bin/"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run rubocop with ruby version managed by RVM
I am using rvm to manage ruby version. I am using ruby 2.5.0. I have also installed the rubocop gem in ruby 2.5.0...
Read more >
Installation :: RuboCop Docs
RuboCop's installation is pretty standard: $ gem install rubocop ... If you'd rather install RuboCop using bundler , don't require it in your...
Read more >
External Tools runs wrong version of ruby via rvm. - YouTrack
I'm running RM 2019.2.3. We put it in the bin folder because that's how we're running rubocop for now, based off bundler binstub...
Read more >
Ruby Version Managers - Launch School - Core Ruby Tools
The system searches for a rubocop command in your PATH , and runs the first one it finds. Since the RVM directories usually...
Read more >
Rubocop with rubocop-sketchup - Developers
... with rubocop (>= 0.82, <= 0.93) /Users/rafaelrivera/.rvm/rubies/ ... /Users/rafaelrivera/.rvm/gems/ruby-2.7.0/gems/rubocop-1.2.0/lib/ ...
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