unexpected token at 'fstat: Bad file descriptor #133

simianarmy opened this Issue May 2, 2012 · 2 comments


None yet
2 participants

Suddenly started getting these errors in my Rails app. Looks like it's coming from CoffeeScript parsing an blank .coffee file.

756: unexpected token at 'fstat: Bad file descriptor
["ok","(function() {\n\n\n\n}).call(this);\n"]'
(in /Users/marcm/Documents/code/cmm//trunk//app/assets/javascripts/parents/sessions.js.coffee)

/Users/marcm/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6/lib/json/common.rb:148:in `parse'

/Users/marcm/.rvm/gems/ruby-1.9.2-p290/gems/json-1.6.6/lib/json/common.rb:148:in `parse'

/Users/marcm/.rvm/gems/ruby-1.9.2-p290/gems/multi_json-1.2.0/lib/multi_json/engines/json_common.rb:9:in `decode'

/Users/marcm/.rvm/gems/ruby-1.9.2-p290/gems/multi_json-1.2.0/lib/multi_json.rb:81:in `decode'

/Users/marcm/.rvm/gems/ruby-1.9.2-p290/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:61:in `extract_result'


flori commented May 9, 2012

What seems to be the problem is, that you want to parse a JSON document, but instead you're trying to parse the string "fstat: Bad file descriptor" which isn't JSON. It looks more like an error message related to the fstat POSIX function, maybe you can figure out why it happens?

@flori flori closed this May 9, 2012

Restarting nginx seemed to have fixed the issue, so it must have been some OS X crazyness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment