gem install rubocop version code example Example: rubocop gem install specific version $ gem install rubocop -v 1.8