POST POST

MAR
18
2022

Fixing VS Code Rubocop Issues

ORIGINALLY POSTED TO: https://blog.simontimms.com/2022/03/18/rubocop-issue

I run this rubocop extension in my VS Code

rubocop extension)

Recently the project I was on did a Ruby update and my rubocop stopped working with an error like this

Rubocop error)

The issue here was that the rubocop in the project was newer than the globally installed rubocop so it was returning empty output. This extension doesn't look like it uses rbenv properly so I needed to globally update rubocop which I did with

1
2
3
/usr/local/bin/rubocop -v  -> 1.22.3
sudo gem install rubocop
/usr/local/bin/rubocop -v -> 1.26

I still had some errors about missing rules and needed to also do

1
2
3
sudo gem install rubocop-rake
sudo gem install rubocop-rails
sudo gem install rubocop-performance

Ideally I'd like this extension to use the rbenv version of ruby but this gets me sorted for now.


Simon Timms

Email Email
Web Web
Twitter Twitter
GitHub GitHub
RSS

Looking for someone else?

You can find the rest of the Western Devs Crew here.

© 2015 Western Devs. All Rights Reserved. Design by Karen Chudobiak, Graphic Designer