On 28-Feb-2005, at 05:06, Jean Helou wrote:
> A bit more context might be useful here ...
>
> On Sun, 27 Feb 2005 17:55:04 -0500, John Johnson
<johnatl-ee4meeAH724@public.gmane.org>
> wrote:
>> WebRick prints a string of errors about the constants in my classes
>> already being defined. Is their something I''m doing wrong /
something
>> I
>> can do to fix it?
Thanks Jean, I just solved the problem. It turns out that the
require ''ecr''
in the following clip from kit.rb is not needed, and was causing the
redundant definition of the kit class (somehow).
Regards,
JJ
This is the beginning of kit.rb:
require ''name_rewrite_rules''
require ''ecr''
require ''file_help''
require ''preference''
require ''fileutils''
class Kit < ActiveRecord::Base
belongs_to :part
belongs_to :rawma
has_many :ecrs
STATUS_UNKNOWN = 0
STATUS_UP_TO_DATE = 1
STATUS_NOT_FOUND = 2
STATUS_OUT_OF_DATE = 3
STATUS_UPDATE_AVAILABLE = 4
FILE_CUTLABEL = 1
FILE_CUT = 2
FILE_LABEL = 3
RELEASED = 1
STAGING = 2
ARCHIVE = 3
And this is a clip from the log:
127.0.0.1 - - [27/Feb/2005:23:07:40 EST] "GET /images/BannerSTVL.jpg
HTTP/1.1" 200 9282
http://vcon:3000/account/welcome?controller=account&action=welcome ->
/images/BannerSTVL.jpg
./script/../config/..//app/models/kit.rb:12: warning: already
initialized constant STATUS_UNKNOWN
./script/../config/..//app/models/kit.rb:13: warning: already
initialized constant STATUS_UP_TO_DATE
./script/../config/..//app/models/kit.rb:14: warning: already
initialized constant STATUS_NOT_FOUND
./script/../config/..//app/models/kit.rb:15: warning: already
initialized constant STATUS_OUT_OF_DATE
./script/../config/..//app/models/kit.rb:16: warning: already
initialized constant STATUS_UPDATE_AVAILABLE
./script/../config/..//app/models/kit.rb:18: warning: already
initialized constant FILE_CUTLABEL
./script/../config/..//app/models/kit.rb:19: warning: already
initialized constant FILE_CUT
./script/../config/..//app/models/kit.rb:20: warning: already
initialized constant FILE_LABEL
./script/../config/..//app/models/kit.rb:22: warning: already
initialized constant RELEASED
./script/../config/..//app/models/kit.rb:23: warning: already
initialized constant STAGING
./script/../config/..//app/models/kit.rb:24: warning: already
initialized constant ARCHIVE
127.0.0.1 - - [27/Feb/2005:23:07:45 EST] "GET /kits/list HTTP/1.1" 500
23693
http://vcon:3000/account/welcome?controller=account&action=welcome ->
/kits/list