Hi all,
I am completely new to use Oracle with Rails (was using MySQL before). I
have some trouble to get my code work despite the rails abstraction.
My code was working perfectly with MySQL, but now when I am trying to
save some objects with a :though relation.
So I have a request objects with many relation to others. When I do
request.save I get an OCIError.
I saw that usually ORA-02289 was a problem of rights in the database but
in this case, the user have all rights. rake db:migrate get no errors at
all.
If someone have more experience with Rails and Oracle, you are welcome
OCIError (ORA-02289: sequence does not exist):
stmt.c:539:in oci8lib.so
c:/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2-x86-mswin32/lib/oci8.rb:753:in
exec' c:/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2-x86-mswin32/lib/oci8.rb:142:in
do_ocicall’
c:/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2-x86-mswin32/lib/oci8.rb:753:in
exec' c:/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.2-x86-mswin32/lib/oci8.rb:255:in
exec’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-oracle-adapter-1.0.0.9250/lib/active_record/connection_adapters/oracle_adapter.rb:700:in
exec' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-oracle-adapter-1.0.0.9250/lib/active_record/connection_adapters/oracle_adapter.rb:229:in
next_sequence_value’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2493:in
create_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:220:in
create_without_timestamps’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/timestamp.rb:29:in
create' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2472:in
create_or_update_without_callbacks’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:207:in
create_or_update' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2206:in
save_without_validation!’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/validations.rb:911:in
save_without_dirty!' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/dirty.rb:83:in
save_without_transactions!’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:110:in
save!' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:79:in
transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:98:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:110:in
save!' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:118:in
rollback_active_record_state!’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:110:in
save!' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/validations.rb:882:in
create!’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/has_many_through_association.rb:61:in
insert_record' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1852:in
with_scope’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/has_many_through_association.rb:61:in
send' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/has_many_through_association.rb:61:in
insert_record’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1215:in
send' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1215:in
after_create_or_update_associated_records_for_services’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_collection.rb:274:in
method_missing' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:175:in
method_missing’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:175:in
each' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:175:in
send’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_proxy.rb:175:in
method_missing' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations/association_collection.rb:274:in
method_missing’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/associations.rb:1215:in
after_create_or_update_associated_records_for_services' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in
send’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:173:in
evaluate_method' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:93:in
run' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:92:in
each’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:92:in
send' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:92:in
run’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:272:in
run_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:298:in
callback’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:221:in
create_without_timestamps' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/timestamp.rb:29:in
create’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2472:in
create_or_update_without_callbacks' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/callbacks.rb:207:in
create_or_update’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2200:in
save_without_validation' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/validations.rb:901:in
save_without_dirty’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/dirty.rb:75:in
save_without_transactions' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in
save’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in
transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:79:in
transaction’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:98:in
transaction' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in
save’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:118:in
rollback_active_record_state!' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/transactions.rb:106:in
save’