Mongrel 0.3.2 Strangely Silent

Discussion in 'Ruby' started by Jim Weirich, Feb 14, 2006.

  1. Jim Weirich

    Jim Weirich Guest

    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::DirHandler.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/.
     
    Jim Weirich, Feb 14, 2006
    #1
    1. Advertising

  2. Jim Weirich

    Jim Weirich Guest

    Jim Weirich, Feb 14, 2006
    #2
    1. Advertising

  3. Jim Weirich

    Zed Shaw Guest

    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" <> 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
     
    Zed Shaw, Feb 14, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?iso-8859-1?q?Nils Hedstr=f6m

    Stateserver behaving strangely

    =?iso-8859-1?q?Nils Hedstr=f6m, Feb 11, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,033
    =?iso-8859-1?q?Nils Hedstr=f6m
    Feb 11, 2005
  2. bill.wu
    Replies:
    0
    Views:
    295
    bill.wu
    Jan 17, 2008
  3. Zed Shaw
    Replies:
    3
    Views:
    225
    Zed Shaw
    Apr 5, 2006
  4. Zed Shaw
    Replies:
    8
    Views:
    162
    Zed Shaw
    Apr 5, 2006
  5. rabarama
    Replies:
    1
    Views:
    152
    Luis Lavena
    Dec 15, 2009
Loading...

Share This Page