Hi all, I have been struggling with this problem for a while. I cannot insert into a table (simple action) with auto-increment mechanism.
I have got: rvm with ruby 1.8.7 gem -v is: 1.6.2 rails -v is" 3.0.5 ruby-oci8 1.0.6 activerecord-oracle-adapter, not the enhanced one, the version I used is 1.0.0.9250. all above versions are required. I created a table " programs" with primary key id. I also created a sequence for auto-increment. : programs_seq I also created a trigger before insert into that table: programs_trigger The table name is programs, therefore, the model name is program class Program < ActiveRecord::Base set_primary_key "id" set_sequence_name "programs_seq" end when i try to insert into that table via sqlplus is works, but when I use rails console I could not, it gives me along errors or exceptions with primary key, First part of the errors: NoMethodError: undefined method `primary_key' for #<ActiveRecord::ConnectionAdapters::OracleAdapter:0xb728b434> .... It is very long message, sorry about that. Please help, I searched for a solution but with no luck. any help will be appreciated. Cheers, Faisal -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.