due_date_reminder
due_date_reminder copied to clipboard
Error running rake: `with_synched_deliveries' in Redmine 1.3
I get the following in my log for the chron job: rake aborted! undefined method `with_synched_deliveries' for Mailer:Class
Tasks: TOP => redmine:reminder_plugin:send_notifications (See full trace by running task with --trace)
Any suggestion?
UPDATE: alnmuniz commented: hi, the file do patch is mailer.rb, here it is located at "redmine install dir"\app\models. All you have to do is copy the with_synched_deliveries method body from the latest version (get it here https://github.com/redmine/redmine/blob/master/app/models/mailer.rb) and paste it into your current mailer.rb version. where exactaly? well, I put it right after the with_deliveries method, but I guess it might work anywhere within the class body. :)
What a version of Redmine do you use? How did you obtain the plugin from github and what is the version?
Hi Oleg, Got the plug in by download from github, version is 1.3.2 but hoping to move to 1.4 soon. Not sure what version plug in, latest version I guess. Thanks for speedy response, Gary On Jun 23, 2012 9:47 AM, "Oleg Kandaurov" < [email protected]> wrote:
What version of Redmine do you use? How did you obtain the plugin from github and what is version?
Reply to this email directly or view it on GitHub: https://github.com/f0y/due_date_reminder/issues/4#issuecomment-6523560
Please, check the plugin version. I guess that you are using wrong version. The latest version of plugin is 0.3.1 and it is for redmine 2.0. The plugin version can be seen on the plugins page.
In order to obtain the plugin for redmine 1.3 go to the plugin directory and perform command
git checkout v0.1.1
Let me know results.
Hi, plugin version was already 0.1.1. So not using wrong version for my version of Redmine.
Any other suggestion?
Well I should check it. It will take some time but I think I'll do it in the nearest weekend.
hi there! I was having the same problem and the cause is that there is no method called 'with_synched_deliveries' in Mailer.rb in version 1.3. I just added this method to Mailer.rb and it worked. Of course this is a workaround, but it should work while I don't upgrade my Redmine version. The method code is:
Sends emails synchronously in the given block
def self.with_synched_deliveries(&block) saved_method = ActionMailer::Base.delivery_method if m = saved_method.to_s.match(%r{^async_(.+)$}) ActionMailer::Base.delivery_method = m[1].to_sym end yield ensure ActionMailer::Base.delivery_method = saved_method end
I see. Do you use the latest version of 1.3.x branch?
I'm not sure because I use the bitnami.org redmine stack version 1.3.2-1. I don't know if that is the latest version of 1.3.x branch.
Sorry, its my fault. I forgot that this changes have been added in Redmine version 1.4 not 1.3. You solution is absolutely correct. I should create patch for version 1.3 and update readme file accordingly.
I have the same problem with RedMine 1.3.0. Can you please explain the fix in a more detailed way (which file exactly to patch and where to insert the patch. Thanks.
hi, the file do patch is mailer.rb, here it is located at "redmine install dir"\app\models. All you have to do is copy the with_synched_deliveries method body from the latest version (get it here https://github.com/redmine/redmine/blob/master/app/models/mailer.rb) and paste it into your current mailer.rb version. where exactaly? well, I put it right after the with_deliveries method, but I guess it might work anywhere within the class body. :)
Thank you alnmuniz for your explanation. I did what you said and it works now perfectly.