You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
prevents the application from starting up - there's a class loading issue, apparently:
=> Booting Puma
=> Rails 7.1.2 application starting in development
=> Run `bin/rails server --help` for more startup options
Exiting
~/.rvm/gems/ruby-3.2.2@webapp/gems/activesupport-7.1.2/lib/active_support/inflector/methods.rb:290:in `constantize': uninitialized constant ApplicationMailer (NameError)
Object.const_get(camel_cased_word)
^^^^^^^^^^
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/activesupport-7.1.2/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/devise-4.9.3/app/mailers/devise/mailer.rb:4:in `<main>'
from <internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from <internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
from ~/webapp/config/initializers/devise_mailers.rb:1:in `<main>'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/engine.rb:683:in `load'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/engine.rb:683:in `block in load_config_initializer'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/activesupport-7.1.2/lib/active_support/notifications.rb:208:in `instrument'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/engine.rb:682:in `load_config_initializer'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/engine.rb:636:in `block (2 levels) in <class:Engine>'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/engine.rb:635:in `each'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/engine.rb:635:in `block in <class:Engine>'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/initializable.rb:32:in `instance_exec'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/initializable.rb:32:in `run'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/initializable.rb:61:in `block in run_initializers'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/initializable.rb:50:in `each'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/initializable.rb:50:in `tsort_each_child'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:415:in `call'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:415:in `each_strongly_connected_component_from'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `each'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `call'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each'
from ~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/initializable.rb:60:in `run_initializers'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/application.rb:423:in `initialize!'
from ~/webapp/config/environment.rb:5:in `<main>'
from config.ru:3:in `require_relative'
from config.ru:3:in `block in <main>'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/rack-3.0.8/lib/rack/builder.rb:103:in `eval'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/rack-3.0.8/lib/rack/builder.rb:103:in `new_from_string'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/rack-3.0.8/lib/rack/builder.rb:94:in `load_file'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/rack-3.0.8/lib/rack/builder.rb:64:in `parse_file'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/rackup-2.1.0/lib/rackup/server.rb:354:in `build_app_and_options_from_config'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/rackup-2.1.0/lib/rackup/server.rb:263:in `app'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/rackup-2.1.0/lib/rackup/server.rb:424:in `wrapped_app'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:36:in `start'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:145:in `block in perform'
from <internal:kernel>:90:in `tap'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/commands/server/server_command.rb:136:in `perform'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/command/base.rb:178:in `invoke_command'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/command/base.rb:73:in `perform'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/command.rb:71:in `block in invoke'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/command.rb:149:in `with_argv'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/command.rb:69:in `invoke'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/railties-7.1.2/lib/rails/commands.rb:18:in `<main>'
from <internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from <internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from ~/.rvm/gems/ruby-3.2.2@webapp/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from bin/rails:6:in `<main>'
Trying to get around this issue by defining the class in config/initializers/devise.rb with something like
class ApplicationMailer < ActionMailer::Base
end
will start the app correctly, but it won't work as expected - none of the before actions defined in app/mailers/application_mailer.rb will apply.
Expected behavior
Setting up parent_mailer should at the very least not crash the booting process.
The text was updated successfully, but these errors were encountered:
Environment
Current behavior
Setting up the
parent_mailer
options withprevents the application from starting up - there's a class loading issue, apparently:
Trying to get around this issue by defining the class in
config/initializers/devise.rb
with something likewill start the app correctly, but it won't work as expected - none of the before actions defined in
app/mailers/application_mailer.rb
will apply.Expected behavior
Setting up
parent_mailer
should at the very least not crash the booting process.The text was updated successfully, but these errors were encountered: