This project is archived and is in readonly mode.

#2440 ✓stale
Don Werve

Bind address ignored with script/server

Reported by Don Werve | April 7th, 2009 @ 04:57 AM | in 3.x

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?

Comments and changes to this ticket

  • Zack Hobson

    Zack Hobson April 23rd, 2009 @ 01:41 AM

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

  • Jeremy Kemper

    Jeremy Kemper May 4th, 2010 @ 06:48 PM

    • Milestone changed from 2.x to 3.x
  • Rohit Arondekar

    Rohit Arondekar October 14th, 2010 @ 03:01 PM

    • 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?

  • Rohit Arondekar

    Rohit Arondekar October 14th, 2010 @ 03:26 PM

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

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:30 PM

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

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:30 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages