yujinakayama / atom-lint

Obsolete: Generic code linting support for Atom
https://atom.io/packages/atom-lint
MIT License
111 stars 33 forks source link

LinterError: rubocop exited with code 127 #99

Closed acrogenesis closed 10 years ago

acrogenesis commented 10 years ago

atom --version 0.127.0 atom-lint@0.20.0

LinterError: rubocop exited with code 127
    command: ["/Users/Adrian/.rvm/gems/ruby-2.1.2/bin/rubocop","--format","json","/Users/Adrian/Copy/Development/munett/munett-usuario/app/uploaders/image_uploader.rb"]
    PATH: /usr/bin:/bin:/usr/sbin:/sbin
    exit code: 127
    stdout:

    stderr:
        env: ruby_executable_hooks: No such file or directory
         lint-view.coffee:54
LinterError: rubocop exited with code 127
  at /Users/Adrian/.atom/packages/atom-lint/lib/linter/rubocop.coffee:56:22
  at ChildProcess.<anonymous> (/Users/Adrian/.atom/packages/atom-lint/lib/command-runner.coffee:32:7)
  at ChildProcess.EventEmitter.emit (events.js:110:17)
  at maybeClose (child_process.js:1005:16)
  at Socket.<anonymous> (child_process.js:1155:11)
  at Socket.EventEmitter.emit (events.js:107:17)
  at Pipe.close (net.js:461:12)

Atom doesn't show if I'm using or not react editor; screen shot 2014-09-12 at 9 24 27 am

acrogenesis commented 10 years ago

if i run on my terminal /Users/Adrian/.rvm/gems/ruby-2.1.2/bin/rubocop --format json /Users/Adrian/Copy/Development/munett/munett-usuario/app/uploaders/image_uploader.rb

It doest give the errors and warnings

ehenrik commented 10 years ago

I experience the same problem running:

If i run the command myself in the prompt I don't get any errors or warnings just like acrogenesis described.

Might be somewhat related to this issue: https://github.com/AtomLinter/Linter/issues/150 because when I launch atom from the terminal this problem doesn't occur.

Janther commented 10 years ago

I started experiencing this issue when I upgraded to Yosemite. For me it doesn't work even when i launch atom from the terminal.

acrogenesis commented 10 years ago

@Janther The quick fix I found was to manually set your path at the init script using this: process.env['PATH'] = "PATH-HERE" on your terminal run echo $PATH to get your path.

Janther commented 10 years ago

That did the trick. Thanks.

On 26-10-2014, at 12:34, Adrian Rangel notifications@github.com wrote:

@Janther https://github.com/Janther The quick fix I found was to manually set your path at the init script using this:

process.env['PATH'] = "PATH-HERE"

on your terminal run echo $PATH to get your path.

— Reply to this email directly or view it on GitHub https://github.com/yujinakayama/atom-lint/issues/99#issuecomment-60520990.

yujinakayama commented 10 years ago

Here's a workaround on OS X Yosemite: https://github.com/yujinakayama/atom-lint#workaround-on-os-x-yosemite

yujinakayama commented 10 years ago

The underlying issue with the PATH is now handled in Atom 0.142.0, so it's recommended to upgrade Atom and remove the process.env.PATH = '...'; in your ~/.atom/init.coffee added by the workaround.