-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't force ActionMailer to lazy load before configuration. #162
Conversation
This has failed CI on 2.2.10 and 2.3.7, but passed on the other 3 ruby versions (older and newer). This appears to be an issue with the CI/project setup and is unrelated to this PR:
|
As a result of upgrading from Rails 5.2 to 6.0, I'm hitting a similar problem as #86 and I believe this fix is in the right direction, but not perfect yet. Rails 6.0 deprecates the old jobs used to send emails in the background in favor of a new job ( The issue is that the initializer file sets the new job via mailgun-ruby/lib/railgun/railtie.rb Lines 5 to 7 in f0f267a
That means the config is already copied from Using Which copies your config to Which errors when it gets to To fix this, I believe this gem's initializer needs to run before the one provided by ActionMailer so that we can add the delivery method before we try copying the initializer "railgun.configure_rails_initialization", before: 'action_mailer.set_configs' do Separately, I'm not sure where this line is coming from, perhaps something for your own application code? ActiveSupport.run_load_hooks(:mailgun_mailer, Railgun::Mailer) |
@cgunther @Benjamin-Dobell Any idea when this might be merged guys? Thanks! |
This commit implements the latest fix mentioned in mailgun#162 and is just a temporary fork until that PR is merged back to the main repo.
I'm just a fellow user of this library, so I have no control over merging. I stumbled onto the original fix and provided my feedback on how it worked for me. |
Three hours of my life wasted until I found that the fault was in this gem! 🤯 And the problem was detected in February 2019 and still, almost two years later, it has not been fixed! 🤬 Bye bye Mailgun... |
For future reference, the error that I was getting is:
Related with rails/rails#36546 |
Any updates on if this change will be merged? Its Feb 2021 and this is still an issue. |
The lack of response on this thread is concerning. Any updates from mailgun on when we can expect this to be resolved? |
How Not to Do Open Source 101, with your lecturer Mailgun: #227 |
Closes #86