Closed kemenaran closed 2 years ago
When adding the Mailjet gem to a Rails project through the Gemfile, it causes Rails to issue a warning in the console when starting the app:
DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.
mailjet
# Gemfile gem 'mailjet'
bin/rails server
The issue occurs because Mailjet's Rail integration causes ActionMail to be loaded early.
ActionMail
This will in turn:
action_text.helpers
ActionController::Base
ActionText
A workaround is to not require the mailjet gem automatically.
# Gemfile gem 'mailjet', require: false
# config/initializers/mailjet ActiveSupport.on_load(:action_mailer) do require 'mailjet' Mailjet.configure do |config| # … end end
Thanks! 💚
Summary
When adding the Mailjet gem to a Rails project through the Gemfile, it causes Rails to issue a warning in the console when starting the app:
Steps to reproduce
mailjet
to the GemfileDetails
The issue occurs because Mailjet's Rail integration causes
ActionMail
to be loaded early.This will in turn:
action_text.helpers
initializer early,ActionController::Base
to be loaded beforeActionText
,ActionText
constants to be automatically discovered,Workaround
A workaround is to not require the
mailjet
gem automatically.