# "Bad file descriptor - connect(2)" = Unable to connect to DB

**URL:** <https://www.ruby-forum.com/t/bad-file-descriptor-connect-2-unable-to-connect-to-db/90590>\
**Category:** Rails\
**Created:** [March 30, 2007, 4:44am UTC](https://www.ruby-forum.com/t/bad-file-descriptor-connect-2-unable-to-connect-to-db/90590 "2007-03-30T04:44:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesarobertson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e68b1a/32.png) [@jamesarobertson](https://www.ruby-forum.com/u/jamesarobertson)\
**Post date:** [March 30, 2007, 4:44am UTC](https://www.ruby-forum.com/t/bad-file-descriptor-connect-2-unable-to-connect-to-db/90590/1 "2007-03-30T04:44:42Z")

</div>

When developing a Rails project I occasionally get the error message:  
‘Bad file descriptor - connect(2)’

The first time this happened, it took me a while to work out that the  
problem was that I have forgotten to start-up my DB server.

Is there some why to get Rails to display a more helpful error message  
in this (type of) situation?
