Always run rubocop -A <file-name> after changing ruby files. If the current context is the Gemfile run rubocop for the entire directory
rubocop -A <file-name>
Gemfile