# Instant Rails

**URL:** <https://www.ruby-forum.com/t/instant-rails/73541>\
**Category:** Rails\
**Created:** [October 25, 2006, 4:55am UTC](https://www.ruby-forum.com/t/instant-rails/73541 "2006-10-25T04:55:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@ron](https://www.ruby-forum.com/u/ron)\
**Post date:** [October 25, 2006, 4:55am UTC](https://www.ruby-forum.com/t/instant-rails/73541/1 "2006-10-25T04:55:26Z")

</div>

I’m having a newbie problem getting Instant Rails to start WEBrick.

I’ve created a demo project by type Rails Demo at the InstantRails  
command prompt. This worked fine.

I then navigate to the Demo directory and type ruby script/server. I  
get the following errors…

C:\InstantRails\InstantRails\rails\_apps\demo\>ruby script/server  
=\> Booting WEBrick…  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Ctrl-C to shutdown server; call with --help for options  
[2006-10-24 18:33:24] INFO WEBrick 1.3.1  
[2006-10-24 18:33:24] INFO ruby 1.8.5 (2006-08-25) [i386-mswin32]  
[2006-10-24 18:33:24] WARN TCPServer Error: Bad file descriptor -  
bind(2)  
C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/utils.rb:73:in  
`initializ e': Bad file descriptor - bind(2) (Errno::EBADF) from C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/utils.rb:73: in `new’  
from  
C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/utils.rb:73:  
in `create_listeners' from C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/utils.rb:70: in `each’  
from  
C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/utils.rb:70:  
in `create_listeners' from C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:75 :in `listen’  
from  
C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:63  
:in `initialize' from C:/InstantRails/InstantRails/ruby/lib/ruby/1.8/webrick/httpserver.r b:24:in `initialize’  
from  
C:/InstantRails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-1.1.  
6/lib/webrick\_server.rb:59:in `new' ... 6 levels... from C:/InstantRails/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/c ustom_require.rb:27:in `gem\_original\_require’  
from  
C:/InstantRails/InstantRails/ruby/lib/ruby/site\_ruby/1.8/rubygems/c  
ustom\_require.rb:27:in `require' from C:/InstantRails/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupp ort-1.3.1/lib/active_support/dependencies.rb:147:in `require’  
from script/server:3

Does anybody have an idea of how i might fix this?

Thanks.

---

<div class="post-metadata">

**Author:** ![ron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@ron](https://www.ruby-forum.com/u/ron)\
**Post date:** [October 25, 2006, 5:59am UTC](https://www.ruby-forum.com/t/instant-rails/73541/2 "2006-10-25T05:59:33Z")

</div>

Ron,

Check your config/database.yaml and config/environment.rb files and  
make sure they exist and are configured correctly.

Nate

---

<div class="post-metadata">

**Author:** ![ron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@ron](https://www.ruby-forum.com/u/ron)\
**Post date:** [October 25, 2006, 6:55am UTC](https://www.ruby-forum.com/t/instant-rails/73541/3 "2006-10-25T06:55:46Z")

</div>

They exist. I’m not really sure what i’m looking for in them, but i  
didn’t touch them. I’m assuming Instant Rails automatically creates  
the database for you. I also cannot get the sample cookbook projects  
to start when i click on ‘start with mongrel’, the dos window closes  
right away.

---

<div class="post-metadata">

**Author:** ![ron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@ron](https://www.ruby-forum.com/u/ron)\
**Post date:** [October 26, 2006, 5:40pm UTC](https://www.ruby-forum.com/t/instant-rails/73541/4 "2006-10-26T17:40:14Z")

</div>

On 10/24/06, Ron [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> They exist. I’m not really sure what i’m looking for in them, but i  
> didn’t touch them. I’m assuming Instant Rails automatically creates  
> the database for you. I also cannot get the sample cookbook projects  
> to start when i click on ‘start with mongrel’, the dos window closes  
> right away.

No, rails does not create the database for you. The  
config/database.yaml file will have default names for your  
development, test, and production databases, but you still have to  
physically create the database (and change the names if you choose a  
different name).

To see what’s going on with Mongrel, open a Ruby console window  
through Instant Rails, navigate into the cookbook directory, and run  
the command “mongrel\_rails”. Now you should be ably to see why its  
aborting without the window going away on you.

Curt

---

<div class="post-metadata">

**Author:** ![ron](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@ron](https://www.ruby-forum.com/u/ron)\
**Post date:** [October 26, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/instant-rails/73541/5 "2006-10-26T17:46:15Z")

</div>

On 10/26/06, Curt H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> development, test, and production databases, but you still have to  
> physically create the database (and change the names if you choose a  
> different name).
> 
> To see what’s going on with Mongrel, open a Ruby console window  
> through Instant Rails, navigate into the cookbook directory, and run  
> the command “mongrel\_rails”. Now you should be ably to see why its  
> aborting without the window going away on you.

Sorry, I should have said to run the command “mongrel\_rails start”.  
You can also force mongrel to do debug logging with “mongrel\_rails  
start -B”, then look for the log file in your Rails app’s “log”  
subdirectory.

Curt
