Atom Hax: Installing Rubocop For Atom

I have recently been trying out Atom text editor and noticed that I couldn’t get Rubocop to work. I kept getting:

Error: env: ruby_executable_hooks: No such file or directory

After some quick searching, the following solution came up on SO. Basically you need to go back to your ~/.atom/config.cson and make the following changes.

 

# This is what your probably have
"linter-rubocop":
command: "/Users/sungkim/.rvm/gems/ruby-2.2.3/bin/rubocop"
# This is what you should have
# Notice that the bin was changed to wrapper
"linter-rubocop":
command: "/Users/sungkim/.rvm/gems/ruby-2.2.3/wrappers/rubocop"

view raw
rubocoprvm.cson
hosted with ❤ by GitHub

Fixed everything for me and now it works like a charm!