# Errno::EBADF: Bad file descriptor - connect

**URL:** <https://www.ruby-forum.com/t/errno-bad-file-descriptor-connect/68622>\
**Category:** Rails\
**Created:** [September 13, 2006, 11:50pm UTC](https://www.ruby-forum.com/t/errno-bad-file-descriptor-connect/68622 "2006-09-13T23:50:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrSInterweb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@MrSInterweb](https://www.ruby-forum.com/u/MrSInterweb)\
**Post date:** [September 13, 2006, 11:50pm UTC](https://www.ruby-forum.com/t/errno-bad-file-descriptor-connect/68622/1 "2006-09-13T23:50:36Z")

</div>

Today this error is the bane of my existence.

It is weird. My app works fine when I am running it through Mongrel,  
but as soon as I try to run a unit test, the test explodes with this  
error.

Any ideas?

---

<div class="post-metadata">

**Author:** ![MrSInterweb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@MrSInterweb](https://www.ruby-forum.com/u/MrSInterweb)\
**Post date:** [September 14, 2006, 12:34am UTC](https://www.ruby-forum.com/t/errno-bad-file-descriptor-connect/68622/2 "2006-09-14T00:34:40Z")

</div>

On Wed, 2006-09-13 at 21:46 +0000, Mr. Interweb wrote:

> Today this error is the bane of my existence.
> 
> It is weird. My app works fine when I am running it through Mongrel,  
> but as soon as I try to run a unit test, the test explodes with this  
> error.
> 
> Any ideas?

Try out the pre-release:

gem install mongrel --source=[http://mongrel.rubyforge.org/releases/](http://mongrel.rubyforge.org/releases/)

And if you still have the problem then let me know.

–  
Zed A. Shaw

> **[Zed A. shaw](https://zedshaw.com/)**
>
> Personal essays and writings by Zed A. Shaw.

[http://mongrel.rubyforge.org/](http://mongrel.rubyforge.org/)  
[http://www.lingr.com/room/3yXhqKbfPy8](http://www.lingr.com/room/3yXhqKbfPy8) – Come get help.

---

<div class="post-metadata">

**Author:** ![MrSInterweb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecd19e/32.png) [@MrSInterweb](https://www.ruby-forum.com/u/MrSInterweb)\
**Post date:** [September 14, 2006, 2:08am UTC](https://www.ruby-forum.com/t/errno-bad-file-descriptor-connect/68622/3 "2006-09-14T02:08:51Z")

</div>

Ok. I figured it out, and it was a major bonehead mistake. I forgot  
to define the testing section in the database.yml file.

LOL 🙂
