Rubocop with RVM
See original GitHub issueHi,
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:
- Created 7 years ago
- Comments:11 (2 by maintainers)
Top 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 >
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 Free
Top 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
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.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/"