Ruby 2.0 Bad file descriptor (Errno::EBADF)

Eric Chapweske eac at
Wed Sep 4 19:00:32 UTC 2013

Eric Wong <normalperson <at>> writes:

> OK, this is really strange; especially since you're only hitting this
> on your legacy app and not a new one.
> I certainly haven't hit this with Ruby 2.0.0 anywhere (neither unicorn
> nor Rainbows!).  I'm fairly certain enough folks are using Ruby 2.0.0 by
> now that we would have more reports if something were amiss.
> Let us know what you find, thanks!

We ran into the same issue. For us, it was because we were executing the 
process using bundle exec.  Bundler doesn't preserve the 1.9 behavior around
FD inheritance.

More information about the mongrel-unicorn mailing list