Hi All, The Linux box I was using to do my rails development had the hard disk upgraded and restarted. Now I am getting the following warnings when I use script/console or script/server Loading development environment (Rails 2.1.0) /denorm_brag_report.rb:423: warning: already initialized constant MAIN_CATEGORIES denorm_brag_report.rb:425: warning: already initialized constant SUB_CATEGORIES /denorm_brag_report.rb:432: warning: already initialized constant TABLE_STD_DESCRIPTIONS /denorm_brag_report.rb:447: warning: already initialized constant SUMMARY_NAMES /denorm_brag_report.rb:455: warning: already initialized constant REPORT_TYPES /denorm_brag_report.rb:469: warning: already initialized constant BRAG_SUMMARY_COLS I have checked the code and these constants are only used in one place I have cleared the cache, checked the gems, and anything else I can think of Is there anything else I could check Gurdipe -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/vDxvof4w01EJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 30 May 2012 10:44, Gurdipe Dosanjh <rhomobileapps-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Loading development environment (Rails 2.1.0) > /denorm_brag_report.rb:423: warning: already initialized constant > MAIN_CATEGORIESDoes your code include the denorm_brag_report.rb file more than once? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
hi Michael I have checked and its not been called anywhere else, but may be im missing something simple it always gives a warning on the last entry of the set of values in assigned to the constants gurdipe On 30 May 2012 10:51, Michael Pavling <pavling-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 30 May 2012 10:44, Gurdipe Dosanjh <rhomobileapps-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Loading development environment (Rails 2.1.0) > > /denorm_brag_report.rb:423: warning: already initialized constant > > MAIN_CATEGORIES > > Does your code include the denorm_brag_report.rb file more than once? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 30 May 2012 12:07, Gurdipe Dosanjh <rhomobileapps-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have checked and its not been called anywhere else, but may be im missing > something simple > > it always gives a warning on the last entry of the set of values in > assigned to the constantsI would recommend putting a breakpoint on the line that defines the constant, and then the second time it gets there have a look at the call stack to see how it''s ending up there twice. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It might be that this file is somewhere in autoload path (/lib, etc.) and you''re also manually requiring it by hand somewhere. On Wednesday, May 30, 2012 10:44:16 AM UTC+1, Gurdipe wrote:> > Hi All, > > The Linux box I was using to do my rails development had the hard disk > upgraded and restarted. Now I am getting the following warnings when I use > script/console or script/server > > Loading development environment (Rails 2.1.0) > /denorm_brag_report.rb:423: warning: already initialized constant > MAIN_CATEGORIES > denorm_brag_report.rb:425: warning: already initialized constant > SUB_CATEGORIES > /denorm_brag_report.rb:432: warning: already initialized constant > TABLE_STD_DESCRIPTIONS > /denorm_brag_report.rb:447: warning: already initialized constant > SUMMARY_NAMES > /denorm_brag_report.rb:455: warning: already initialized constant > REPORT_TYPES > /denorm_brag_report.rb:469: warning: already initialized constant > BRAG_SUMMARY_COLS > > I have checked the code and these constants are only used in one place > > I have cleared the cache, checked the gems, and anything else I can think > of > > Is there anything else I could check > > Gurdipe >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/MLLj2ZuSbokJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.