Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Redmine 4.0.2-0 #3

Open
fcsteenkamp opened this issue Mar 6, 2019 · 5 comments
Open

Redmine 4.0.2-0 #3

fcsteenkamp opened this issue Mar 6, 2019 · 5 comments

Comments

@fcsteenkamp
Copy link

After installing the plugin, I could not get the Thin_redmine and Thin_redmine2 services started, with no logfile entries in the apache (access/error) files and also no entries in the application production log file.

I tried starting the service manually an I got this error:
C:/Bitnami/redmine-4.0.2-0/apps/redmine/htdocs/vendor/bundle/ruby/2.4.0/gems/actionmailer-5.2.2/lib/action_mailer/base.rb:582:in method_missing': undefined method alias_method_chain' for MailHandler:Class (NoMethodError)

Any ideas how to solve this issue..?

@fcsteenkamp
Copy link
Author

Ok, so after some googling, I found that "alias_method_chain" has been deprecated in the latest version of 5.2 rails. Prepend should be used instead. Would any ruby developer be able to change that couple of lines in the "mail_handler_patch.rb" file to the prepend structure required?

@yennor
Copy link

yennor commented Jul 25, 2019

i've just had the same problem. Would be great if somebody could change that

@mpauz
Copy link

mpauz commented Mar 6, 2020

/plugins/redmine_email_inline_images/lib/redmine_email_inline_images/mail_handler_patch.rb "Line 7"

module RedmineEmailInlineImages
  module MailHandlerPatch
    def self.included(base) # :nodoc:
      base.send(:include, InstanceMethods)
      
      base.class_eval do
  -      #alias_method_chain :plain_text_body, :email_inline_images
  +      alias_method :plain_text_body_without_email_inline_images, :plain_text_body
  +      alias_method :plain_text_body, :plain_text_body_with_email_inline_images
      end
    end

Looks like all working :)

@yennor
Copy link

yennor commented Mar 10, 2020

hey thanks a lot :-)
I'll try it out as soon as I'll find time for it

@mpauz
Copy link

mpauz commented Mar 12, 2020

For me whole week works on production. i think we can close.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants