bundle exec rubocop
seems to be using an older version of rubocop
, but how can I use the rubocop managed by the bundleer?
$bundle exec rubocop-v
warning: parser/current is loading parser/ruby22, which recognizes
warning: 2.2.x-component syntax, but you are running 2.3.1.
warning —Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
0.35.1
$rubocop-v
0.46.0
$whichrubocop
/usr/local/bin/rubocop
$bundle exec which rubocop
/usr/local/bin/rubocop
I think it's because the rubocop version written in Gemfile.lock is old.
bundle update rubocop
is a good idea.
© 2025 OneMinuteCode. All rights reserved.