Error running rubocop

Every time i tried to do something in Atom is pops out a massage saying error running RuboCop. When i open the toggle developer tools, it shows this…

[Linter] Error running RuboCop Error: Failed to spawn command rubocop. Make sure rubocop is installed and on your PATH
at /Users/dg/.atom/packages/linter-rubocop/node_modules/atom-linter/lib/helpers.js:130:24
at process._tickCallback (internal/process/next_tick.js:103:7)

I installed the Atom packages again and it seemed to fix the problem.