Article:
  Rolling with Ruby on Rails
Subject:   WEBrick won't answer requests
Date:   2006-06-21 03:34:06
From:   Mick_sp
Hi


I'm starting with RoR, trying to get things working. I'm following this tutorial for my first steps. At the point where i'm supposed to start the server for the first time i'm not getting any further. WEBrick seems to work:


=======================================
Microsoft Windows XP [versie 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


C:\>cd rails\cookbook


C:\rails\cookbook>ruby script\server
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2006-06-21 11:24:23] INFO WEBrick 1.3.1
[2006-06-21 11:24:23] INFO ruby 1.8.2 (2004-12-25) [i386-mswin32]
[2006-06-21 11:24:23] INFO WEBrick::HTTPServer#start: pid=2016
port=3000
=======================================


but my browser won't show the page if i try to access http://127.0.0.1:3000/ it just hangs. ctrl-c wont work to stop the server anymore in the
WEBrick console after i tried to get a page (it will if i haven't accessed a page yet). there's no disk or CPU activity. I have apache 1.3
installed but stopped the service for this test (shouldn't make a difference). Its a windows XP system and MySql 4.1.


One more thing: i wasn't able to use the --remote option in gem install rails. somehow it's not responding. So i downloaded the gems and installed them one by one. ( http://www.ruby-forum.com/topic/69447 last but one reply)


MichaŽl

Full Threads Oldest First

Showing messages 1 through 4 of 4.

  • WEBrick won't answer requests
    2006-07-17 09:17:45  Cobold [View]

    Hi,
    well it is pretty normal that it is not working. I think you have noticed that
    => Rails application started on http://0.0.0.0:3000
    wich means, you should try to access http://0.0.0.0:3000 from your browser, however it will not work.
    Try starting the server with the following commmand:
    ruby script\server --binding 127.0.0.1
    and it will work.

    Cheers
  • Curt Hibbs photo WEBrick won't answer requests
    2006-06-21 07:24:48  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    Its possible that there is something wrong with your installation of Rails since you did it manually. I suggest trying Instant Rails, which includes Ruby, Rails, and MySQL all preconfigured and ready to run (it also include Apache, but you can just ignore that part):

    http://instantrails/rubyforge.org/

    Also, there is a modified version of the cookbook tutorial that is specific to Instant Rails that you can find here:

    http://instantrails.rubyforge.org/wiki/wiki.pl?Rolling_With_Ruby_On_Instant_Rails_Tutorial

    Curt
    • WEBrick won't answer requests
      2006-06-21 23:47:27  Mick_sp [View]

      I tries Instant Rails....with exactly the same result. I think it must be some problem with my PC. I tried your tutorial at home: works instantly. I'll try it there, instead of wasting more time, i'm due for a new computer anyway!

      thanks for the help,
      MichaŽl
      • WEBrick won't answer requests
        2006-08-07 00:58:32  Henra [View]

        We have sort of same kind problem with three PCs in our office. (2 WinXP, 1 W2K ... all Japanese Version)

        I had tried with not only WEBRick, but also SCGI. The problems had not been resolved; this is not because of WEBrick. Also, I have installed Rails from scratch with two differenct version of Ruby besides the InstantRails, and they didn't work either.

        Finaly, I have removed some applications from my PC, and then the problem has gone. The most suspiciousĀ@application was "secure application manager"--- but the name was in Japanese Characters---, I guess.

        Before the action I took, I have checked file+directory permissions, because the server application seems not able to read/write something, or some event requests are hooked by the other process.

        Why don't you check out dubious applications in your PC? Hopefully the problem would be resolved.