newrelic rpm interferring with merb-mailer 1.0.9
not sure what's going on yet but newrelic def. is interferring with my user signup, specifically my UserMailer controller; I can disable newrelic and this works fine, but with it in it fails like so:
merb : worker (port 4003) ~ undefined local variable or method `request' for #<usermailer:0xb7255104> - (NameError)
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:114:in `_dispatch'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/method_tracer.rb:41:in `trace_method_execution_with_scope'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:109:in `_dispatch'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/method_tracer.rb:18:in `trace_method_execution_no_scope'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:103:in `_dispatch'
/usr/lib/ruby/gems/1.8/gems/merb-mailer-1.0.9/lib/merb-mailer/mail_controller.rb:321:in `dispatch_and_deliver'
/usr/lib/ruby/gems/1.8/gems/merb-mailer-1.0.9/lib/merb-mailer/mail_controller.rb:338:in `dispatch_and_deliver'
/mnt/app/releases/20090224174929/app/models/user.rb:135:in `send_signup_notification'
the relevant code is:
def send_signup_notification
params = {}
if Merb.environment.eql? 'production' then
UserMailer.dispatch_and_deliver(:signup, params.merge( :to => self.email,
:from => 'support@mysite.com', :subject => 'Invitation to Mysite!'),
:user => self)
end
end
let me know if I can provide more information..it kinda sucks cause I can't use this right now in it's current state
gem list | grep merb
antage-merb-recaptcha (1.0.2)
merb (1.0.9, 1.0.6.1, 1.0, 0.9.12, 0.9.10)
merb-action-args (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-assets (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth-core (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth-more (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth-slice-password (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-cache (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-core (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-exceptions (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-gen (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-haml (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-helpers (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-jquery (0.9.8)
merb-mailer (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-more (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-param-protection (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-slices (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb_datamapper (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb_paginate (0.0.4)
merb_recaptcha (0.0.4)
</usermailer:0xb7255104>
merb : worker (port 4003) ~ undefined local variable or method `request' for #<usermailer:0xb7255104> - (NameError)
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:114:in `_dispatch'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/method_tracer.rb:41:in `trace_method_execution_with_scope'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:109:in `_dispatch'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/method_tracer.rb:18:in `trace_method_execution_no_scope'
/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.8.4/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:103:in `_dispatch'
/usr/lib/ruby/gems/1.8/gems/merb-mailer-1.0.9/lib/merb-mailer/mail_controller.rb:321:in `dispatch_and_deliver'
/usr/lib/ruby/gems/1.8/gems/merb-mailer-1.0.9/lib/merb-mailer/mail_controller.rb:338:in `dispatch_and_deliver'
/mnt/app/releases/20090224174929/app/models/user.rb:135:in `send_signup_notification'
the relevant code is:
def send_signup_notification
params = {}
if Merb.environment.eql? 'production' then
UserMailer.dispatch_and_deliver(:signup, params.merge( :to => self.email,
:from => 'support@mysite.com', :subject => 'Invitation to Mysite!'),
:user => self)
end
end
let me know if I can provide more information..it kinda sucks cause I can't use this right now in it's current state
gem list | grep merb
antage-merb-recaptcha (1.0.2)
merb (1.0.9, 1.0.6.1, 1.0, 0.9.12, 0.9.10)
merb-action-args (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-assets (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth-core (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth-more (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-auth-slice-password (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-cache (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-core (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-exceptions (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-gen (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-haml (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-helpers (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-jquery (0.9.8)
merb-mailer (1.0.9, 1.0.8.1, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-more (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-param-protection (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb-slices (1.0.9, 1.0.8.1, 1.0.6.1, 1.0.3, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb_datamapper (1.0.9, 1.0.6.1, 1.0, 0.9.13, 0.9.12, 0.9.10)
merb_paginate (0.0.4)
merb_recaptcha (0.0.4)
</usermailer:0xb7255104>
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
The company marked this problem solved.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?feydr, i'll get right on this. meanwhile can you send this message to support@newrelic.com so I can track it and keep you better informed?
-
Inappropriate?sure .. thnx for the quick response!
-
Inappropriate?I went ahead and fixed my problem, although there still seems to be a problem with newrelic overriding MerbMailer's dispatch_and_deliver (something with the var 'request'). I moved my method from the model to the controller and stuck it into a run_later loop like so:
run_later do
Merb::Mailer.new( :from => 'support@mysite.com', :to => @user.email,
:subject => 'Site Activation!', :text => partial(:signup)).deliver!
end
I’m happy
-
Inappropriate?Sorry feydr, I meant to get back to you about this. As I said, it's better if you communicate with support@newrelic.com.
I believe I fixed this problem in 2.8.5 of the agent. What version are you using? If you still get that error with 2.8.5 or later, can you send me the stack trace at support@newrelic.com? -
Inappropriate?Feydr,
Can we add cc and bcc for dispath and deliver like this
PersonMailer.dispatch_and_deliver(action, params.merge(:from => from, :to => to, :cc => @cc), self )
I’m confused
-
Inappropriate?Eshwar: according to the docs you should be able to do cc, I don't see bcc listed ... http://merbivore.com/documentation/cu... -- also, note that I'm using an entirely diff. method than dispatch&deliver in my 'fix'
Loading Profile...



EMPLOYEE