diff --git a/guides/bug_report_templates/action_mailbox_gem.rb b/guides/bug_report_templates/action_mailbox_gem.rb index 52dab0bfa1..5493a213d1 100644 --- a/guides/bug_report_templates/action_mailbox_gem.rb +++ b/guides/bug_report_templates/action_mailbox_gem.rb @@ -10,6 +10,11 @@ gemfile(true) do # Activate the gem you are reporting the issue against. gem "rails", "6.1.0" gem "sqlite3" + if RUBY_VERSION >= "3.1" + # net-smtp, net-imap and net-pop were removed from default gems in Ruby 3.1, but is used by the `mail` gem. + # So we need to add them as dependencies until `mail` is fixed: https://github.com/mikel/mail/pull/1439 + gem "net-smtp", require: false + end end require "active_record/railtie" diff --git a/guides/bug_report_templates/action_mailbox_main.rb b/guides/bug_report_templates/action_mailbox_main.rb index 15d48c8320..7661940ff5 100644 --- a/guides/bug_report_templates/action_mailbox_main.rb +++ b/guides/bug_report_templates/action_mailbox_main.rb @@ -9,6 +9,11 @@ gemfile(true) do gem "rails", github: "rails/rails", branch: "main" gem "sqlite3" + if RUBY_VERSION >= "3.1" + # net-smtp, net-imap and net-pop were removed from default gems in Ruby 3.1, but is used by the `mail` gem. + # So we need to add them as dependencies until `mail` is fixed: https://github.com/mikel/mail/pull/1439 + gem "net-smtp", require: false + end end require "active_record/railtie"