This project is archived and is in readonly mode.

#3506 ✓stale
Colin Curtin

Rackup options crashes script/server

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

When loading a 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 > with these contents: #\ -w -p 3001
4. script/server
5. crash.

Relavent log:
$ ./script/server => Booting Mongrel => Rails 2.3.4 application starting on /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

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

Comments and changes to this ticket

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=""></a>