pat / after_commit

A Ruby on Rails plugin to add an after_commit callback. This can be used to trigger things only after the entire transaction is complete.
MIT License
62 stars 32 forks source link

activerecord-jdbc-adapter 1.2.1 breaks compatibility #9

Closed nilbus closed 11 years ago

nilbus commented 12 years ago

ArJdbc 1.2.0 works, but 1.2.1 gives me this traceback:

$ script/server -e production -p 3002
=> Booting Mongrel
=> Rails 2.3.14 application starting on http://0.0.0.0:3002

NameError: undefined method `commit_db_transaction' for module `ArJdbc::MySQL'
                     alias_method at org/jruby/RubyModule.java:2221
               alias_method_chain at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/activesupport-2.3.14/lib/active_support/core_ext/module/aliasing.rb:33
                         included at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/after_commit-1.0.10/lib/after_commit/connection_adapters.rb:74
                      module_eval at org/jruby/RubyModule.java:2242
                         included at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/after_commit-1.0.10/lib/after_commit/connection_adapters.rb:4
                          include at org/jruby/RubyModule.java:2083
                             send at org/jruby/RubyKernel.java:2097
   include_after_commit_extension at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/after_commit-1.0.10/lib/after_commit/active_record.rb:29
  include_after_commit_extensions at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/after_commit-1.0.10/lib/after_commit/active_record.rb:20
                           (root) at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/after_commit-1.0.10/lib/after_commit.rb:81
                          require at org/jruby/RubyKernel.java:1038
                          require at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184
                           (root) at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/after_commit-1.0.10/lib/after_commit.rb:2
                          require at org/jruby/RubyKernel.java:1038
                          require at /Users/nilbus/.rvm/gems/jruby-1.6.5@robertson/gems/thinking-sphinx-1.3.14/lib/thinking_sphinx.rb:68
nilbus commented 12 years ago

@nirvdrum - Thought you might be interested in working on this, since you fixed compatibility last time.

pat commented 12 years ago

Given I'm not at all familiar with JRuby, I'm hoping one of you can figure this out.

flyerhzm commented 12 years ago

my pull request solves this issue, https://github.com/freelancing-god/after_commit/pull/11

nilbus commented 12 years ago

Thanks @flyerhzm!