i got my app to run fine on one server, but I moved it to another and huge problem started.... I''ve been trying various things for 3 hours now, I can''t get it to work.... I am getting this error. Exception `TypeError'' at (eval):542 - superclass mismatch for class NotFound I am using the same camping.rb, apps starts in CGI but not in Apache/FastCGI. while it works fine on my other server the only difference I can think of, its the apache version. but I run rails fastcgi on this same apache, so the apache version should not be a problem. anyone got that error before ? also, when running ruby -d, I was wondering if those warnings could be eliminated? (eval):672: warning: `*'' interpreted as argument prefix (eval):700: warning: `*'' interpreted as argument prefix (eval):97: warning: already initialized constant C (eval):99: warning: already initialized constant P (eval):101: warning: already initialized constant H (eval):132: warning: method redefined; discarding old method_missing (eval):135: warning: discarding old u (eval):208: warning: method redefined; discarding old R (eval):233: warning: method redefined; discarding old errors_for (eval):241: warning: method redefined; discarding old / (eval):268: warning: method redefined; discarding old URL (eval):312: warning: already initialized constant Z (eval):339: warning: method redefined; discarding old method_missing (eval):359: warning: method redefined; discarding old redirect (eval):372: warning: method redefined; discarding old r (eval):374: warning: method redefined; discarding old initialize (eval):417: warning: method redefined; discarding old service (eval):425: warning: method redefined; discarding old to_s (eval):429: warning: method redefined; discarding old markaby (eval):456: warning: method redefined; discarding old r (eval):478: warning: method redefined; discarding old R (eval):497: warning: method redefined; discarding old D (eval):515: warning: method redefined; discarding old M Exception `TypeError'' at (eval):542 - superclass mismatch for class NotFound Exception `TypeError'' at /usr/rubyonrails/lib/ruby/gems/1.8/gems/camping- 1.4.2/lib/camping.rb:597 - (eval):542: superclass mismatch for class NotFound Exception `TypeError'' at /usr/rubyonrails//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:143 - (eval):542: superclass mismatch for class NotFound -- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060801/b11b657b/attachment.html
found this ... http://www.ruby-forum.com/topic/73894 the problem seems to be with the fact camping code is re-read over and over again. R() always returns a new Class why is the code red multiple times? On 8/1/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> > i got my app to run fine on one server, but I moved it to another and huge > problem started.... > I''ve been trying various things for 3 hours now, I can''t get it to > work.... > I am getting this error. > Exception `TypeError'' at (eval):542 - superclass mismatch for class > NotFound > > I am using the same camping.rb, apps starts in CGI but not in > Apache/FastCGI. > while it works fine on my other server > > the only difference I can think of, its the apache version. but I run > rails fastcgi on this same apache, so the apache version should not be a > problem. > > anyone got that error before ? > > also, when running ruby -d, I was wondering if those warnings could be > eliminated? > > (eval):672: warning: `*'' interpreted as argument prefix > (eval):700: warning: `*'' interpreted as argument prefix > (eval):97: warning: already initialized constant C > (eval):99: warning: already initialized constant P > (eval):101: warning: already initialized constant H > (eval):132: warning: method redefined; discarding old method_missing > (eval):135: warning: discarding old u > (eval):208: warning: method redefined; discarding old R > (eval):233: warning: method redefined; discarding old errors_for > (eval):241: warning: method redefined; discarding old / > (eval):268: warning: method redefined; discarding old URL > (eval):312: warning: already initialized constant Z > (eval):339: warning: method redefined; discarding old method_missing > (eval):359: warning: method redefined; discarding old redirect > (eval):372: warning: method redefined; discarding old r > (eval):374: warning: method redefined; discarding old initialize > (eval):417: warning: method redefined; discarding old service > (eval):425: warning: method redefined; discarding old to_s > (eval):429: warning: method redefined; discarding old markaby > (eval):456: warning: method redefined; discarding old r > (eval):478: warning: method redefined; discarding old R > (eval):497: warning: method redefined; discarding old D > (eval):515: warning: method redefined; discarding old M > Exception `TypeError'' at (eval):542 - superclass mismatch for class > NotFound > Exception `TypeError'' at /usr/rubyonrails/lib/ruby/gems/1.8/gems/camping- > 1.4.2 /lib/camping.rb:597 - (eval):542: superclass mismatch for class > NotFound > Exception `TypeError'' at > /usr/rubyonrails//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:143 > - (eval):542: superclass mismatch for class NotFound > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static > -ldl -lcrypt -lm -o ruby > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > Take the control over your money, track your expenses > http://justbudget.com > > Mathieu >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060801/718192d6/attachment.html
Hi Mathieu, it looks like your app is loaded twice. Since NotFound inherits from R() and that R() passes a new class each time, this is normal that your get that error. On 01/08/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> found this ... http://www.ruby-forum.com/topic/73894 > the problem seems to be with the fact camping code is re-read over and over > again. > R() always returns a new Class > why is the code red multiple times? > > > On 8/1/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > > > i got my app to run fine on one server, but I moved it to another and huge > problem started.... > > I''ve been trying various things for 3 hours now, I can''t get it to > work.... > > I am getting this error. > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > NotFound > > > > I am using the same camping.rb, apps starts in CGI but not in > Apache/FastCGI. > > while it works fine on my other server > > > > the only difference I can think of, its the apache version. but I run > rails fastcgi on this same apache, so the apache version should not be a > problem. > > > > anyone got that error before ? > > > > also, when running ruby -d, I was wondering if those warnings could be > eliminated? > > > > (eval):672: warning: `*'' interpreted as argument prefix > > (eval):700: warning: `*'' interpreted as argument prefix > > (eval):97: warning: already initialized constant C > > (eval):99: warning: already initialized constant P > > (eval):101: warning: already initialized constant H > > (eval):132: warning: method redefined; discarding old method_missing > > (eval):135: warning: discarding old u > > (eval):208: warning: method redefined; discarding old R > > (eval):233: warning: method redefined; discarding old errors_for > > (eval):241: warning: method redefined; discarding old / > > (eval):268: warning: method redefined; discarding old URL > > (eval):312: warning: already initialized constant Z > > (eval):339: warning: method redefined; discarding old method_missing > > (eval):359: warning: method redefined; discarding old redirect > > (eval):372: warning: method redefined; discarding old r > > (eval):374: warning: method redefined; discarding old initialize > > (eval):417: warning: method redefined; discarding old service > > (eval):425: warning: method redefined; discarding old to_s > > (eval):429: warning: method redefined; discarding old markaby > > (eval):456: warning: method redefined; discarding old r > > (eval):478: warning: method redefined; discarding old R > > (eval):497: warning: method redefined; discarding old D > > (eval):515: warning: method redefined; discarding old M > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > NotFound > > Exception `TypeError'' at > /usr/rubyonrails/lib/ruby/gems/1.8/gems/camping-1.4.2 > /lib/camping.rb:597 - (eval):542: superclass mismatch for class NotFound > > Exception `TypeError'' at > /usr/rubyonrails//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:143 > - (eval):542: superclass mismatch for class NotFound > > > > > > -- > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > -lruby-static -ldl -lcrypt -lm -o ruby > > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > > Take the control over your money, track your expenses > http://justbudget.com > > > > > > Mathieu > > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > -lruby-static -ldl -lcrypt -lm -o ruby > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > Take the control over your money, track your expenses http://justbudget.com > > Mathieu > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > >-- Cheers, zimbatm http://zimbatm.oree.ch
Opps didn''t read that post. On 01/08/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> found this ... http://www.ruby-forum.com/topic/73894 > the problem seems to be with the fact camping code is re-read over and over > again. > R() always returns a new Class > why is the code red multiple times? > > > On 8/1/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > > > i got my app to run fine on one server, but I moved it to another and huge > problem started.... > > I''ve been trying various things for 3 hours now, I can''t get it to > work.... > > I am getting this error. > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > NotFound > > > > I am using the same camping.rb, apps starts in CGI but not in > Apache/FastCGI. > > while it works fine on my other server > > > > the only difference I can think of, its the apache version. but I run > rails fastcgi on this same apache, so the apache version should not be a > problem. > > > > anyone got that error before ? > > > > also, when running ruby -d, I was wondering if those warnings could be > eliminated? > > > > (eval):672: warning: `*'' interpreted as argument prefix > > (eval):700: warning: `*'' interpreted as argument prefix > > (eval):97: warning: already initialized constant C > > (eval):99: warning: already initialized constant P > > (eval):101: warning: already initialized constant H > > (eval):132: warning: method redefined; discarding old method_missing > > (eval):135: warning: discarding old u > > (eval):208: warning: method redefined; discarding old R > > (eval):233: warning: method redefined; discarding old errors_for > > (eval):241: warning: method redefined; discarding old / > > (eval):268: warning: method redefined; discarding old URL > > (eval):312: warning: already initialized constant Z > > (eval):339: warning: method redefined; discarding old method_missing > > (eval):359: warning: method redefined; discarding old redirect > > (eval):372: warning: method redefined; discarding old r > > (eval):374: warning: method redefined; discarding old initialize > > (eval):417: warning: method redefined; discarding old service > > (eval):425: warning: method redefined; discarding old to_s > > (eval):429: warning: method redefined; discarding old markaby > > (eval):456: warning: method redefined; discarding old r > > (eval):478: warning: method redefined; discarding old R > > (eval):497: warning: method redefined; discarding old D > > (eval):515: warning: method redefined; discarding old M > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > NotFound > > Exception `TypeError'' at > /usr/rubyonrails/lib/ruby/gems/1.8/gems/camping-1.4.2 > /lib/camping.rb:597 - (eval):542: superclass mismatch for class NotFound > > Exception `TypeError'' at > /usr/rubyonrails//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:143 > - (eval):542: superclass mismatch for class NotFound > > > > > > -- > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > -lruby-static -ldl -lcrypt -lm -o ruby > > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > > Take the control over your money, track your expenses > http://justbudget.com > > > > > > Mathieu > > > > -- > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > -lruby-static -ldl -lcrypt -lm -o ruby > Everyone is trying their hardest to do their job but management has set it > up so that it''s impossible. > Take the control over your money, track your expenses http://justbudget.com > > Mathieu > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list > >-- Cheers, zimbatm http://zimbatm.oree.ch
One possible solution is that your code is separated in more than one file where some file requires your main camping file. Since the camping/reloader uses Kernel#load to load your apps and that this method doesn''t add the loaded file in the $LOADED_FEATURES array, if you Kernel#require that same file, it will get loaded a second time. Is it the case ? On 01/08/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote:> Opps didn''t read that post. > > On 01/08/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > found this ... http://www.ruby-forum.com/topic/73894 > > the problem seems to be with the fact camping code is re-read over and over > > again. > > R() always returns a new Class > > why is the code red multiple times? > > > > > > On 8/1/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > > > > > i got my app to run fine on one server, but I moved it to another and huge > > problem started.... > > > I''ve been trying various things for 3 hours now, I can''t get it to > > work.... > > > I am getting this error. > > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > > NotFound > > > > > > I am using the same camping.rb, apps starts in CGI but not in > > Apache/FastCGI. > > > while it works fine on my other server > > > > > > the only difference I can think of, its the apache version. but I run > > rails fastcgi on this same apache, so the apache version should not be a > > problem. > > > > > > anyone got that error before ? > > > > > > also, when running ruby -d, I was wondering if those warnings could be > > eliminated? > > > > > > (eval):672: warning: `*'' interpreted as argument prefix > > > (eval):700: warning: `*'' interpreted as argument prefix > > > (eval):97: warning: already initialized constant C > > > (eval):99: warning: already initialized constant P > > > (eval):101: warning: already initialized constant H > > > (eval):132: warning: method redefined; discarding old method_missing > > > (eval):135: warning: discarding old u > > > (eval):208: warning: method redefined; discarding old R > > > (eval):233: warning: method redefined; discarding old errors_for > > > (eval):241: warning: method redefined; discarding old / > > > (eval):268: warning: method redefined; discarding old URL > > > (eval):312: warning: already initialized constant Z > > > (eval):339: warning: method redefined; discarding old method_missing > > > (eval):359: warning: method redefined; discarding old redirect > > > (eval):372: warning: method redefined; discarding old r > > > (eval):374: warning: method redefined; discarding old initialize > > > (eval):417: warning: method redefined; discarding old service > > > (eval):425: warning: method redefined; discarding old to_s > > > (eval):429: warning: method redefined; discarding old markaby > > > (eval):456: warning: method redefined; discarding old r > > > (eval):478: warning: method redefined; discarding old R > > > (eval):497: warning: method redefined; discarding old D > > > (eval):515: warning: method redefined; discarding old M > > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > > NotFound > > > Exception `TypeError'' at > > /usr/rubyonrails/lib/ruby/gems/1.8/gems/camping-1.4.2 > > /lib/camping.rb:597 - (eval):542: superclass mismatch for class NotFound > > > Exception `TypeError'' at > > /usr/rubyonrails//lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:143 > > - (eval):542: superclass mismatch for class NotFound > > > > > > > > > -- > > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > > -lruby-static -ldl -lcrypt -lm -o ruby > > > Everyone is trying their hardest to do their job but management has set it > > up so that it''s impossible. > > > Take the control over your money, track your expenses > > http://justbudget.com > > > > > > > > > Mathieu > > > > > > > > -- > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > > -lruby-static -ldl -lcrypt -lm -o ruby > > Everyone is trying their hardest to do their job but management has set it > > up so that it''s impossible. > > Take the control over your money, track your expenses http://justbudget.com > > > > Mathieu > > _______________________________________________ > > Camping-list mailing list > > Camping-list at rubyforge.org > > http://rubyforge.org/mailman/listinfo/camping-list > > > > > > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch >-- Cheers, zimbatm http://zimbatm.oree.ch
the class NotFound < R() line is within Camping code itself, not my code. all the code is read twice,..... but why ? could not camping use Kernel#require instead of Kernel#load ? but anyway, camping code is also read twice, not only my code. so I really dont understand.... On 8/1/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote:> > One possible solution is that your code is separated in more than one > file where some file requires your main camping file. > > Since the camping/reloader uses Kernel#load to load your apps and that > this method doesn''t add the loaded file in the $LOADED_FEATURES array, > if you Kernel#require that same file, it will get loaded a second > time. Is it the case ? > > On 01/08/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote: > > Opps didn''t read that post. > > > > On 01/08/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > > found this ... http://www.ruby-forum.com/topic/73894 > > > the problem seems to be with the fact camping code is re-read over and > over > > > again. > > > R() always returns a new Class > > > why is the code red multiple times? > > > > > > > > > On 8/1/06, Mathieu Jobin <mathieu at justbudget.com> wrote: > > > > > > > > i got my app to run fine on one server, but I moved it to another > and huge > > > problem started.... > > > > I''ve been trying various things for 3 hours now, I can''t get it to > > > work.... > > > > I am getting this error. > > > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > > > NotFound > > > > > > > > I am using the same camping.rb, apps starts in CGI but not in > > > Apache/FastCGI. > > > > while it works fine on my other server > > > > > > > > the only difference I can think of, its the apache version. but I > run > > > rails fastcgi on this same apache, so the apache version should not be > a > > > problem. > > > > > > > > anyone got that error before ? > > > > > > > > also, when running ruby -d, I was wondering if those warnings could > be > > > eliminated? > > > > > > > > (eval):672: warning: `*'' interpreted as argument prefix > > > > (eval):700: warning: `*'' interpreted as argument prefix > > > > (eval):97: warning: already initialized constant C > > > > (eval):99: warning: already initialized constant P > > > > (eval):101: warning: already initialized constant H > > > > (eval):132: warning: method redefined; discarding old method_missing > > > > (eval):135: warning: discarding old u > > > > (eval):208: warning: method redefined; discarding old R > > > > (eval):233: warning: method redefined; discarding old errors_for > > > > (eval):241: warning: method redefined; discarding old / > > > > (eval):268: warning: method redefined; discarding old URL > > > > (eval):312: warning: already initialized constant Z > > > > (eval):339: warning: method redefined; discarding old method_missing > > > > (eval):359: warning: method redefined; discarding old redirect > > > > (eval):372: warning: method redefined; discarding old r > > > > (eval):374: warning: method redefined; discarding old initialize > > > > (eval):417: warning: method redefined; discarding old service > > > > (eval):425: warning: method redefined; discarding old to_s > > > > (eval):429: warning: method redefined; discarding old markaby > > > > (eval):456: warning: method redefined; discarding old r > > > > (eval):478: warning: method redefined; discarding old R > > > > (eval):497: warning: method redefined; discarding old D > > > > (eval):515: warning: method redefined; discarding old M > > > > Exception `TypeError'' at (eval):542 - superclass mismatch for class > > > NotFound > > > > Exception `TypeError'' at > > > /usr/rubyonrails/lib/ruby/gems/1.8/gems/camping-1.4.2 > > > /lib/camping.rb:597 - (eval):542: superclass mismatch for class > NotFound > > > > Exception `TypeError'' at > > > /usr/rubyonrails//lib/ruby/gems/1.8/gems/activesupport-1.3.1 > /lib/active_support/dependencies.rb:143 > > > - (eval):542: superclass mismatch for class NotFound > > > > > > > > > > > > -- > > > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > > > -lruby-static -ldl -lcrypt -lm -o ruby > > > > Everyone is trying their hardest to do their job but management has > set it > > > up so that it''s impossible. > > > > Take the control over your money, track your expenses > > > http://justbudget.com > > > > > > > > > > > > Mathieu > > > > > > > > > > > > -- > > > gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o > > > -lruby-static -ldl -lcrypt -lm -o ruby > > > Everyone is trying their hardest to do their job but management has > set it > > > up so that it''s impossible. > > > Take the control over your money, track your expenses > http://justbudget.com > > > > > > Mathieu > > > _______________________________________________ > > > Camping-list mailing list > > > Camping-list at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/camping-list > > > > > > > > > > > > -- > > Cheers, > > zimbatm > > > > http://zimbatm.oree.ch > > > > > -- > Cheers, > zimbatm > > http://zimbatm.oree.ch > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-- gcc -O0 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic -L. main.o -lruby-static -ldl -lcrypt -lm -o ruby Everyone is trying their hardest to do their job but management has set it up so that it''s impossible. Take the control over your money, track your expenses http://justbudget.com Mathieu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/camping-list/attachments/20060802/5a08d2c1/attachment-0001.html
On 02/08/06, Mathieu Jobin <mathieu at justbudget.com> wrote:> the class NotFound < R() line is within Camping code itself, not my code. > all the code is read twice,..... but why ?When you call Camping.goes, Camping eval''s it''s own code by replacing "module Camping" with "module YourApp". So it doesn''t mean that camping is reloaded.> could not camping use Kernel#require instead of Kernel#load ?Well. You can''t require an application twice, thus reloading wouldn''t work. (Unless you remove that app from the $LOADED_FEATURES array). Furthermore, since Ruby doesn''t know the absolute path of the loaded files, you can''t garantee that the file won''t be loaded twice.> but anyway, camping code is also read twice, not only my code. > so I really dont understand....See my answer before :-) -- Cheers, zimbatm http://zimbatm.oree.ch