Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Bind address ignored with script/server

#2440

Running Rails 2.3.2 on JRuby 1.2.0 (OpenJDK 1.6.0_0-b11). Can create a Rails app just fine, but 'script/server' will only allow connections from localhost, even if passed the '-b' option. Dug through the code a bit, and found that WEBrick expects :BindAddress in its option hash, whereas Mongrel (and all the others) want :Host, which is what gets set by the script.

Adding the following at line 47 in commands/server.rb fixes the problem:

options[:BindAddress] = options[:Host]

Should I submit a patch, since it's a one-line fix, or no?

Reported by Don Werve · April 7th, 2009 @ 04:57 AM

State: stale
Milestone: 3.x
Assigned to: Rohit Arondekar Rohit Arondekar
Importance: Low

Activity

  1. Zack Hobson
    Zack Hobson
    • Tag changed from 2.3.2, console, console_app.rb, script, webrick to 2.3.2, console, console_app.rb, patch, script, webrick

    FWIW, I needed this fix, so I forked and published:

    http://github.com/zenhob/rails/c...

    April 23rd, 2009 @ 01:41 AM

  2. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  3. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to open
    • Importance changed from to Low

    On rails 3.0 although it works, the server takes forever to respond.

    ~/bugmash/test_app९ rails s -b 127.0.0.3
    => Booting WEBrick
    => Rails 3.0.0 application starting in development on http://127.0.0.3:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    [2010-10-14 19:24:15] INFO  WEBrick 1.3.1
    [2010-10-14 19:24:15] INFO  ruby 1.9.2 (2010-08-18) [x86_64-linux]
    [2010-10-14 19:24:15] INFO  WEBrick::HTTPServer#start: pid=4351 port=3000
    
    
    Started GET "/posts" for 127.0.0.3 at 2010-10-14 19:24:43 +0530
      Processing by PostsController#index as HTML
      SQL (0.4ms)   SELECT name
     FROM sqlite_master
     WHERE type = 'table' AND NOT name = 'sqlite_sequence'
    
      Post Load (0.1ms)  SELECT "posts".* FROM "posts"
    Rendered posts/index.html.erb within layouts/application (2.2ms)
    Completed 200 OK in 68ms (Views: 5.1ms | ActiveRecord: 0.5ms)
    

    Note the Completed 200 OK in 68ms above. Does this happen to anybody else?

    October 14th, 2010 @ 03:01 PM

  4. Rohit Arondekar
    Rohit Arondekar
    • Assigned user set to Rohit Arondekar

    OS: Ubuntu 10.04
    Ruby: ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
    Rails: Rails 3.0.0

    Leaving ticket open for sometime to get some kind of confirmation on the slowness that I found. Also will try on JRuby soon & report back soon.

    October 14th, 2010 @ 03:26 PM

  5. Santiago Pastorino
    Santiago Pastorino
    • Tag changed from 2.3.2, console, console_app.rb, patch, script, webrick to 232, console, console_apprb, patch, script, webrick

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:30 PM

  6. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:30 PM