WEBrick - What am I doing wrong?

I can start the WEBrick web server fine. But, when I try to access
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
=> 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.
[email protected]
[email protected]

On 7/29/07, Davi [email protected] wrote:

    I can start the WEBrick web server fine. But, when I try to access

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 or http://127.0.0.1:3000? Same
error?

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

On 7/29/07, Davi [email protected] wrote:

    I can start the WEBrick web server fine. But, when I try to

access 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 or 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.
[email protected]
[email protected]

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.
[email protected]
[email protected]

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

#<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.

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.