kimda
2014-Sep-18 08:35 UTC
ActiveRecord::StatementInvalid (OCIError: ORA-00001: unique constraint (xxxxxxxx) violated:
Hello, I have developed a small RoR app(ruby 1.8.7, rails 2.1.0, rubygem 0.9.4) a few years ago and now I moved the app on Windows 2008 server. I have a weird issue that insert doesn't work all the time. This is the error message and there is no duplicated PK insertion when I check DB table. ActiveRecord::StatementInvalid (OCIError: ORA-00001: unique constraint (xxxxxxxx) violated: INSERT INTO xxxxxx (xxxx, xxxx, xxxx, xxxx, ......) ... ... ... I am the only one who is testing and there are no opened sessions. I am sure production DB schema and test DB schema are identical. I tested with all three environments with test DB schema, but didn't help. One thing to note is that after I get the RoR error message, if I just hit F5 key a few times, the insertion works and I get the next successful page. This same app is working fine on Windows 2003 server though. (I just copied the app dir and all the RoR setup.) Any clues? thanks in advance. Daniel -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1a85802e-a692-45c7-812c-9ed256a659b2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.