hello all, i have a problem when i go to 0.14.1, my data model which work under 0.13.1 dont work anymore. it seems that there s no more belongs_to declaration working on win xp. i declare my relations like class Entitycaracteristic < BiographyModel belongs_to :entity , :foreign_key => "idEntity" , :class_name => "Entity" end and when i do e = Entitycaracteristic.find(1) e.entity.to_s it raise me an error like : c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/base.rb:143 3:in `define_read_method'': undefined method `type_cast_code'' for nil:NilClass (NoMethodError) from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/base.rb:1113:in `id'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/belongs_to_association.rb:67:in `construct_sql'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/belongs_to_association.rb:7:in `initialize'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations.rb:637:in `new'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations.rb:637:in `entity'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations.rb:633:in `entity'' from C:/Incoming/test2.rb:25:in `test'' from C:/Incoming/test2.rb:24:in `each'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_proxy.rb:72:in `send'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_proxy.rb:72:in `method_missing'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_collection.rb:129:in `method_missing'' from C:/Incoming/test2.rb:24:in `test'' from C:/Incoming/test2.rb:38 can someone help ? thx "Ce message et toutes les pièces jointes sont des informations strictement confidentielles et réservées au(x) destinataire(s). Ce courriel n''a pas de valeur contractuelle et son contenu ne constitue ni une acceptation, ni un engagement de la part de l''auteur et des sociétés du groupe Serveur et Artprice, sauf dans le cas où cela aurait été prévu avec le destinataire par un accord écrit. Le contenu de ce message et les pièces jointes ne peuvent constituer une preuve au sens de l''article 1316-1 du Code Civil. L.auteur et les sociétés du groupe Serveur et Artprice déclinent toute responsabilité au titre de ce courriel s''il a été altéré, déformé, falsifié ou indûment utilisé par des tiers ou encore s''il a causé tout dommage ou perte de toute nature. Si vous n''êtes pas le bon destinataire, merci de nous contacter et de ne pas le divulguer." "This message including any attachments are confidential and privileged material intended solely for the addressees. Its contents do not constitute a commitment by groupe Serveur sas and Artprice SA, except when provided for in a written agreement with the addressees. The contents of this message cannot constitute neither the proof nor the acceptance of any agreement as per article 1316-1 of the French civil code. Groupe Serveur sas and Artprice SA shall not be rendered liable in any manner whatsoever for the delay and/or loss in transit of this message, for corruption, alteration, falsification, misuse or fraudulent use (which may be made) of this message. If you receive this message in error, please delete it and immediately notify the sender. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized use, copying or dissemination is prohibited."
Christophe Vigny wrote:> hello all, > > > i have a problem when i go to 0.14.1, my data model which work under > 0.13.1 dont work anymore. > it seems that there s no more belongs_to declaration working on win xp. > > i declare my relations like > class Entitycaracteristic < BiographyModel > belongs_to :entity , > :foreign_key => "idEntity" , > :class_name => "Entity" > end > > and when i do > e = Entitycaracteristic.find(1) > e.entity.to_s it raise me an error like : > > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/base.rb:143 > > 3:in `define_read_method'': undefined method `type_cast_code'' for > nil:NilClass (NoMethodError) > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/base.rb:1113:in > `id'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/belongs_to_association.rb:67:in > `construct_sql'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/belongs_to_association.rb:7:in > `initialize'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations.rb:637:in > `new'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations.rb:637:in > `entity'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations.rb:633:in > `entity'' > from C:/Incoming/test2.rb:25:in `test'' from > C:/Incoming/test2.rb:24:in `each'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_proxy.rb:72:in > `send'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_proxy.rb:72:in > `method_missing'' > from > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_collection.rb:129:in > `method_missing'' > from C:/Incoming/test2.rb:24:in `test'' > from C:/Incoming/test2.rb:38 > > > can someone help ? >It seems to be a genuine bug. Could you please submit a ticket for this, along with the involved model/table definitions? The link is: http://dev.rubyonrails.org/newticket I have been trying to reproduce the problem but haven''t been successful so far. Thanks. -- stefan
Stefan Kaes wrote:> Christophe Vigny wrote: > >> hello all, >> >> >> i have a problem when i go to 0.14.1, my data model which work under >> 0.13.1 dont work anymore. >> it seems that there s no more belongs_to declaration working on win xp. >>I just now discovered that you submitted a ticket (http://dev.rubyonrails.org/ticket/2549) previously. I had updated this ticket and asked a few questions about your problem, but you did not react. If you''re not able to provide more data, I cannot resolve ticket. -- stefan
Hi stefan, i just tried what u said in track ticket and it work ! I do @@generate_read_methods = false I have attache all the needed code to reproduce the bug so u can work on it (it''s realy small !) thx for this precious help ! Stefan Kaes wrote:> Stefan Kaes wrote: > >> Christophe Vigny wrote: >> >>> hello all, >>> >>> >>> i have a problem when i go to 0.14.1, my data model which work under >>> 0.13.1 dont work anymore. >>> it seems that there s no more belongs_to declaration working on win xp. >>> > I just now discovered that you submitted a ticket > (http://dev.rubyonrails.org/ticket/2549) previously. I had updated > this ticket and asked a few questions about your problem, but you did > not react. If you''re not able to provide more data, I cannot resolve > ticket. > > -- stefan > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >"Ce message et toutes les pices jointes sont des informations strictement confidentielles et rserves au(x) destinataire(s). Ce courriel n''a pas de valeur contractuelle et son contenu ne constitue ni une acceptation, ni un engagement de la part de l''auteur et des socits du groupe Serveur et Artprice, sauf dans le cas o cela aurait t prvu avec le destinataire par un accord crit. Le contenu de ce message et les pices jointes ne peuvent constituer une preuve au sens de l''article 1316-1 du Code Civil. L.auteur et les socits du groupe Serveur et Artprice dclinent toute responsabilit au titre de ce courriel s''il a t altr, dform, falsifi ou indment utilis par des tiers ou encore s''il a caus tout dommage ou perte de toute nature. Si vous n''tes pas le bon destinataire, merci de nous contacter et de ne pas le divulguer." "This message including any attachments are confidential and privileged material intended solely for the addressees. Its contents do not constitute a commitment by groupe Serveur sas and Artprice SA, except when provided for in a written agreement with the addressees. The contents of this message cannot constitute neither the proof nor the acceptance of any agreement as per article 1316-1 of the French civil code. Groupe Serveur sas and Artprice SA shall not be rendered liable in any manner whatsoever for the delay and/or loss in transit of this message, for corruption, alteration, falsification, misuse or fraudulent use (which may be made) of this message. If you receive this message in error, please delete it and immediately notify the sender. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized use, copying or dissemination is prohibited."