grosser/ar_after_transaction — Issue #3: ModelName.transaction(:requires_new => true) -- ArgumentError: wrong number of arguments (1 for 0)
Author: shedd
Created: 2012-01-06 16:17:25+00:00
State: open

I'm testing the ar_after_transaction gem to add my Resque jobs after the transaction completes.

I had several transactions that were specified as follows:

ModelName.transaction(:requires_new => true) do
#do something
end

After installing ar_after_transaction, these started returning the following:

ArgumentError: wrong number of arguments (1 for 0)
from /data/appname/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:491:in `transaction_without_trace_ActiveRecord_self_name_transaction'
from /data/appname/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:491:in `transaction'
from /data/appname/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
from /data/appname/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.3.1/lib/new_relic/agent/method_tracer.rb:486:in `transaction'
from (irb):6

When I remove the ar_after_transaction gem, these return to normal.

Is this a New Relic issue (as the trace mentions New Relic) or an issue with the gem? New Relic has never had an issue with these transactions before.

Thanks!