1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

2 commits

Author SHA1 Message Date
Yasuo Honda
255e3b9819 Add net/smtp gem for bug report templates to support Ruby 3.1
Ruby 3.1 extracts some gems to bundled one, which requires to add these gems to Gemfile explicitly.
`net/smtp` is one of them, which affected Action Mailbox bug report templates.

* Steps to reproduce

Install `ruby 3.1.0dev`

```
git clone https://github.com/rails/rails.git
cd rails/guides
ruby bug_report_templates/action_mailbox_gem.rb
ruby bug_report_templates/action_mailbox_main.rb
```

* This commit addresses the following error `cannot load such file -- net/smtp (LoadError)`

```
$ ruby bug_report_templates/action_mailbox_gem.rb
... snip ...
Using rails 6.1.0
/home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require': cannot load such file -- net/smtp (LoadError)
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/mail-2.7.1/lib/mail.rb:9:in `<module:Mail>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/mail-2.7.1/lib/mail.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/actionmailbox-6.1.0/lib/action_mailbox/mail_ext.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/actionmailbox-6.1.0/lib/action_mailbox.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/actionmailbox-6.1.0/lib/action_mailbox/engine.rb:9:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `block in require'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:299:in `load_dependency'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/gems/3.1.0/gems/activesupport-6.1.0/lib/active_support/dependencies.rb:332:in `require'
	from bug_report_templates/action_mailbox_gem.rb:17:in `<main>'
```

* Added comment when this dependency can be removed based on https://bugs.ruby-lang.org/issues/17873

Refer
https://github.com/ruby/ruby/pull/4530
https://github.com/rails/rails/pull/42308

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2021-06-07 00:15:21 +09:00
Rafael Mendonça França
077c66d5d6
Rename master to main in all code references 2021-01-19 20:46:33 +00:00
Renamed from guides/bug_report_templates/action_mailbox_master.rb (Browse further)