Hello all, it''s part of my code on RoR ": Case #1 Hello all, there is part of my code : folder = Folder1.new() folder.ID = @id folder.CLIENT_NAME = @un folder.TREE_NAME = @tn folder.save() when i test it on mySQL all work right, but when i try it with Oracle i got this error #NoMethodError (undefined method `ID='' for #<FolderTree:0x4bae7cc>). Case #2 I try again with other RoR api method Folder1.create(:ID => @id, :CLIENT_NAME => @un, :TREE_NAME => @tn) and again got error : #NoMethodError (undefined method `CLIENT_NAME='' for #<FolderTree:0x4baf6a4>) Notes: 1. Field id not auto-increment (filled manually) 2. Folder1 it''s model of folder table It''s exist table structure of folder1 model : { ID INTERGER CLIENT_NAME VARCHAR2(35 BYTE) NOT NULL, TREE_NAME VARCHAR2(35 BYTE) NOT NULL } Does anybody know why is an error ? Or another path to insert new record. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
SaD wrote:> folder = Folder1.new() > folder.ID = @id > got this error #NoMethodError (undefined method `ID='' for > #<FolderTree:0x4bae7cc>).Can you post the full class definition you have for Folder1? And FolderTree? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
you use :ID instead of :id MySQL is not case sensitive (at least with it''s column names) maybe oracle is? same goes for :CLIENT_NAME etc -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---