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.

Rackup options crashes script/server

#3506

When loading a config.ru with an options line at the top, script/server complains there is no "opts" variable.

Steps to reproduce:
1. Create a new rails app.
2. cd new_app
3. cat > config.ru with these contents: #\ -w -p 3001
4. script/server
5. crash.

Relavent log:
$ ./script/server => Booting Mongrel => Rails 2.3.4 application starting on http://0.0.0.0:3000 /Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:76: undefined local variable or method opts' for main:Object (NameError)

from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from ./script/server:3

Diagnosis:
railties/lib/commands/server.rb line 76 assumes it has access to the 'opts' object in the optparser block starting on line 24.

Reported by Colin Curtin · November 24th, 2009 @ 12:55 AM

State: stale
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

    October 6th, 2010 @ 06:30 AM

  2. bingbing