How to tell Rubocop to ignore a specific directory or file

Solution 1:

As per orde's comment with the link to the manual I found .rubocop.yml and added the following:

AllCops:
  Exclude:
    - 'path/to/excluded/file.rb'

where the path is relative to .rubocop.yml

Solution 2:

From rubocop/default.yml:

AllCops:
  Exclude:
    - 'node_modules/**/*'
    - 'vendor/**/*'