# Bad file descriptor - connect(2)

**URL:** <https://www.ruby-forum.com/t/bad-file-descriptor-connect-2/101825>\
**Category:** Rails\
**Created:** [August 8, 2006, 7:00am UTC](https://www.ruby-forum.com/t/bad-file-descriptor-connect-2/101825 "2006-08-08T07:00:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janeve\_George](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@Janeve\_George](https://www.ruby-forum.com/u/Janeve_George)\
**Post date:** [August 8, 2006, 7:00am UTC](https://www.ruby-forum.com/t/bad-file-descriptor-connect-2/101825/1 "2006-08-08T07:00:53Z")

</div>

Hi All,

I am a newbie in Ruby-Rails. Actually we are using postgre SQL and Ruby  
application to access the DB. I have made the controller and the model  
classes. My database.yml contains:

development:  
adapter: postgresql  
database: test  
username: poc  
password: poc  
host: localhost:5000

test:  
adapter: postgresql  
database: test  
username: poc  
password: poc  
host: localhost:5000

production:  
adapter: postgresql  
database: test  
username: poc  
password: poc  
host: localhost:5000

I have actually configured my postgresql to listen to port 5000 rather  
than 5432(default). When I hit the url [http://127.0.0.1:3000/Testing/new](http://127.0.0.1:3000/Testing/new)  
it is showing an error:

Bad file descriptor - connect(2)

My model → testing.rb

class Testing \< ActiveRecord::Base

end

My Controller → testing\_controller.rb

class TestingController \< ApplicationController  
scaffold :testing  
end

How can I resolve this problem… Thanks in advance…

Regards,  
Janeve

---

<div class="post-metadata">

**Author:** ![Janeve\_George](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@Janeve\_George](https://www.ruby-forum.com/u/Janeve_George)\
**Post date:** [August 8, 2006, 11:09am UTC](https://www.ruby-forum.com/t/bad-file-descriptor-connect-2/101825/2 "2006-08-08T11:09:29Z")

</div>

you are probably running on a windows platform using ‘instantrails’ and  
you didn’t run the application. (you have to run the red “I” icon in the  
instantrails folder - - it connects all of the applications together -  
sql, application, rails, etc)

hope it works.

harp

Janeve George wrote:

> Hi All,
> 
> I am a newbie in Ruby-Rails. Actually we are using postgre SQL and Ruby  
> application to access the DB. I have made the controller and the model  
> classes. My database.yml contains:
> 
> development:  
> adapter: postgresql  
> database: test  
> username: poc  
> password: poc  
> host: localhost:5000
> 
> test:  
> adapter: postgresql  
> database: test  
> username: poc  
> password: poc  
> host: localhost:5000
> 
> production:  
> adapter: postgresql  
> database: test  
> username: poc  
> password: poc  
> host: localhost:5000
> 
> I have actually configured my postgresql to listen to port 5000 rather  
> than 5432(default). When I hit the url [http://127.0.0.1:3000/Testing/new](http://127.0.0.1:3000/Testing/new)  
> it is showing an error:
> 
> Bad file descriptor - connect(2)
> 
> My model → testing.rb
> 
> class Testing \< ActiveRecord::Base
> 
> end
> 
> My Controller → testing\_controller.rb
> 
> class TestingController \< ApplicationController  
> scaffold :testing  
> end
> 
> How can I resolve this problem… Thanks in advance…
> 
> Regards,  
> Janeve
