linter-rubocop是Atom的package,可以幫忙檢查寫Ruby時的coding style有沒有符合規定,安裝方式詳見reference。
Error: env: ruby_executable_hooks: No such file or directory
at /Users/username/.atom/packages/linter-rubocop/index.coffee:18:15
按照官方的設定教學,我們在搜尋rubocop的path時會出現:
which rubocop
# /Users/username/.rvm/gems/ruby-2.2.1/bin/rubocop
導致,Atom的設定會變成:
'linter-rubocop':
'executablePath': '/Users/username/.rvm/gems/ruby-2.2.1/bin/rubocop'
此時換成:
'linter-rubocop':
# Replace 'bin' to 'wrappers'
'executablePath': '/Users/username/.rvm/gems/ruby-2.2.1/wrappers/rubocop'
重啟Atom,便不會再出現error message。
+linter-rubocop
+Linter can't find env: ruby_executable_hooks