# WEBrick - What am I doing wrong?

**URL:** <https://www.ruby-forum.com/t/webrick-what-am-i-doing-wrong/110680>\
**Category:** Rails\
**Created:** [July 29, 2007, 3:05pm UTC](https://www.ruby-forum.com/t/webrick-what-am-i-doing-wrong/110680 "2007-07-29T15:05:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@Davi](https://www.ruby-forum.com/u/Davi)\
**Post date:** [July 29, 2007, 3:05pm UTC](https://www.ruby-forum.com/t/webrick-what-am-i-doing-wrong/110680/1 "2007-07-29T15:05:29Z")

</div>

I can start the WEBrick web server fine. But, when I try to access  
[http://0.0.0.0:3000](http://0.0.0.0:3000), I get the follow:

[WEBrick]  
$ script/server  
=\> Booting WEBrick…

```
  *******************************************************************
  * config.breakpoint_server has been deprecated and has no effect. 

```

- 

```
*******************************************************************

```

=\> 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  
[2007-07-29 10:02:04] INFO WEBrick 1.3.1  
[2007-07-29 10:02:04] INFO ruby 1.8.6 (2007-06-07) [i686-linux]  
[2007-07-29 10:02:04] INFO WEBrick::HTTPServer#start: pid=2855  
port=3000  
Status: 500 Internal Server Error  
Content-Type: text/html  
Content-Length: 60

# 500 Internal Server Error
# ["/usr/lib/ruby/1.8/webrick/httputils.rb:129:in `parse_header'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/webrick_server.rb:146:in `extract\_header\_and\_body'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/webrick\_server.rb:118:in `handle_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/webrick_server.rb:78:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'", "/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/webrick\_server.rb:62:in `dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/commands/servers/webrick.rb:65", "/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require'", "/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `require'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2.7116/lib/active_support/dependencies.rb:495:in `require'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2.7116/lib/active\_support/dependencies.rb:342:in `new_constants_in'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2.7116/lib/active_support/dependencies.rb:495:in `require'", "/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/commands/server.rb:39", "/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in `gem_original_require'", "/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'", "script/server:3"] [2007-07-29 10:02:04] ERROR `/' not found. 127.0.0.1 - - [29/Jul/2007:10:02:04 BRT] "GET / HTTP/1.1" 404 268 - -\> / [/WEBrick]

I tried server -u, but I get the follow:

[WEBrick -u]  
$ script/server -u  
=\> Booting WEBrick…  
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/commands/servers/webrick.rb:53:  
undefined local variable or method `start_debugger' for main:Object (NameError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require’  
from  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’

from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2.7116/lib/active\_support/dependencies.rb:495:in  
`require’

from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2.7116/lib/active\_support/dependencies.rb:342:in  
`new\_constants\_in’

from  
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2.7116/lib/active\_support/dependencies.rb:495:in  
`require’

from  
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/commands/server.rb:39  
from  
/usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’  
from script/server:3  
[/WEBrick -u]

What am I doing wrong?  
I haven’t changed anything in my app, and it works on my production  
server,  
but don’t on my dev box.

Thank you very much.

## – Davi V. removed\_email\_address@domain.invalid removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Davi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@Davi](https://www.ruby-forum.com/u/Davi)\
**Post date:** [July 30, 2007, 7:17am UTC](https://www.ruby-forum.com/t/webrick-what-am-i-doing-wrong/110680/2 "2007-07-30T07:17:46Z")

</div>

On 7/29/07, Davi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> I can start the WEBrick web server fine. But, when I try to access
> 
> ```
> 
> [http://0.0.0.0:3000](http://0.0.0.0:3000), I get the follow:

I am surprised to see anything in the webrick log. I would not expect  
0.0.0.0:3000 to route at all. What happens if you try to point your  
web browser to [http://localhost:3000](http://localhost:3000) or [http://127.0.0.1:3000](http://127.0.0.1:3000)? Same  
error?

---

<div class="post-metadata">

**Author:** ![Davi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@Davi](https://www.ruby-forum.com/u/Davi)\
**Post date:** [July 30, 2007, 2:48pm UTC](https://www.ruby-forum.com/t/webrick-what-am-i-doing-wrong/110680/3 "2007-07-30T14:48:42Z")

</div>

Em Segunda 30 Julho 2007 02:17, Cynthia K. escreveu:

> On 7/29/07, Davi [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > ```
> > I can start the WEBrick web server fine. But, when I try to
> > 
> > ```
> > 
> > access [http://0.0.0.0:3000](http://0.0.0.0:3000), I get the follow:
> 
> I am surprised to see anything in the webrick log. I would not expect  
> 0.0.0.0:3000 to route at all. What happens if you try to point your  
> web browser to [http://localhost:3000](http://localhost:3000) or [http://127.0.0.1:3000](http://127.0.0.1:3000)? Same  
> error?

Yes.

I’ve installed MySQL and MySQL Gem on my dev’s box yesterday. But I  
don’t  
believe that the problem is it.

Sorry my poor english.

## – Davi V. removed\_email\_address@domain.invalid removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Davi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@Davi](https://www.ruby-forum.com/u/Davi)\
**Post date:** [July 31, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/webrick-what-am-i-doing-wrong/110680/4 "2007-07-31T15:37:40Z")

</div>

As I am a Gentoo user, I must compile everything on my box. So, I must  
compile Ruby, Gems, Rails and everything else. My problem is that I  
forget to  
add suport to fcgi + mysql when compiling.

Sorry my mistake and thank you all for the time spend.

All (server side) is working now. There are some bugs in my  
application. I  
think that I can solve it by now. Thank you.

## – Davi V. removed\_email\_address@domain.invalid removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Davi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecb155/32.png) [@Davi](https://www.ruby-forum.com/u/Davi)\
**Post date:** [July 30, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/webrick-what-am-i-doing-wrong/110680/5 "2007-07-30T17:55:07Z")

</div>

1. 

Do you get friendlier messages when you use mongrel instead of webrick?

1. 

#\<NoMethodError:  
You have a nil object when you didn’t expect it!  
You might have expected an instance of Array.  
The error occurred while evaluating nil.each\>

You have a bad loop somewhere. Usually something like this is happening:  
@product = Product.find(:all)  
@product.each do |product|  
puts product  
end

If you have no Products in the database you will get the error listed  
above.

1. 

usr/lib/ruby/gems/1.8/gems/rails-1.2.3.7116/lib/commands/servers/webrick.rb:53:  
undefined local variable or method `start\_debugger’ for main:Object  
(NameError)

The breakpointer is dead now. Use ruby-debug gem if you need to debug  
rails.

-Chuck V.
