Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Mongrel 0.3.2 Strangely Silent

Reply
Thread Tools

Mongrel 0.3.2 Strangely Silent

 
 
Jim Weirich
Guest
Posts: n/a
 
      02-14-2006
I wanted to check out the latest ruby craze: Mongrel. So I installed
mongrel as a gem, whipped up a small example based on the docs. But no
joy. Running the script shows no output on the terminal and a browser
trying to load the url just keeps spinning the "in-progress" indicator.

Here's the script:

------------------------------------
#!/usr/bin/env ruby

require 'mongrel'

class SimpleHandler < Mongrel::HttpHandler
def process(request, response)
response.start(200) do |head,out|
head["Content-Type"] = "text/plain"
out.write("hello!\n")
end
end
end

h = Mongrel::HttpServer.new("0.0.0.0", "3030")
h.register("/test", SimpleHandler.new)
h.register("/files", Mongrel:irHandler.new("."))
h.run.join
-----------------------------------------

The web addess I tried was http://localhost:3030. Also tried
http://traken:3030 (where traken is the name of the host). I also tried
using "localhost" explicitly in the script instead of "0.0.0.0".

What am I missing here?

--
-- Jim Weirich



--
Posted via http://www.ruby-forum.com/.


 
Reply With Quote
 
 
 
 
Jim Weirich
Guest
Posts: n/a
 
      02-14-2006
Jim Weirich wrote:
> The web addess I tried was http://localhost:3030. Also tried
> http://traken:3030 (where traken is the name of the host). I also tried
> using "localhost" explicitly in the script instead of "0.0.0.0".


Just to be clear ... I also tried the http://localhost:3030/files and
http://localhost:3030/test too. Debugging prints added to the "process"
method in the script reveals that it never gets called.

--
-- Jim Weirich

--
Posted via http://www.ruby-forum.com/.


 
Reply With Quote
 
 
 
 
Zed Shaw
Guest
Posts: n/a
 
      02-14-2006
Hey Jim,

Yeah, looks like I didn't regression test the new timeout code outside of
Ruby on Rails. Doh!

Your stuff should run if you do ruby -rtimeout for now. I'm posting a new
release as we speak to include this one-line fix.

Thanks for catching it.

Zed


On 2/14/06 7:37 AM, "Jim Weirich" <(E-Mail Removed)> wrote:

> Jim Weirich wrote:
>> The web addess I tried was http://localhost:3030. Also tried
>> http://traken:3030 (where traken is the name of the host). I also tried
>> using "localhost" explicitly in the script instead of "0.0.0.0".

>
> Just to be clear ... I also tried the http://localhost:3030/files and
> http://localhost:3030/test too. Debugging prints added to the "process"
> method in the script reveals that it never gets called.
>
> --
> -- Jim Weirich




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mongrel service vs mongrel in command shell rabarama Ruby 1 12-15-2009 12:46 PM
the tutor list has been strangely silent for a few days. Anyone knowwhat has happened? bill.wu Python 0 01-17-2008 03:38 PM
[ANN] Mongrel Web Server 0.3.12.2 -- Iron Mongrel (Parser Fix) Zed Shaw Ruby 8 04-05-2006 06:32 AM
Mongrel Web Server 0.3.12.1 -- Iron Mongrel Zed Shaw Ruby 3 04-05-2006 06:31 AM
PAgP - silent and non-silent modes andymacca Cisco 1 03-26-2006 06:28 PM



Advertisments