ruby on rails - NoMethodError: undefined method `substitute_at' for nil:NilClass -


i getting issue while destroying object.

nomethoderror: undefined method `substitute_at' nil:nilclass /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/persistence.rb:135:in `destroy' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/locking/optimistic.rb:103:in `destroy' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/callbacks.rb:254:in `block in destroy' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:480:in `_run__348799253__destroy__466331341__callbacks' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/callbacks.rb:254:in `destroy' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/transactions.rb:254:in `block in destroy' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/transactions.rb:208:in `transaction' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/activerecord-3.2.11/lib/active_record/transactions.rb:254:in `destroy' (irb):1 /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in `start' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in `start' /usr/local/rvm/gems/ruby-1.9.3-p194@clu2/gems/railties-3.2.11/lib/rails/commands.rb:41:in `<top (required)>' script/rails:6:in `require' 

i have fixed issue, app's 1 of association name connection reserved word in active record gem:

see line #135 https://github.com/rails/rails/blob/3-2-stable/activerecord/lib/active_record/persistence.rb

i changed association name connection else , fine now.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -