1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/guides/bug_report_templates
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
..
action_controller_gem.rb Update bug report templates to use Rails 6.1.0 2020-12-13 16:52:48 +09:00
action_controller_main.rb Rename master to main in all code references 2021-01-19 20:46:33 +00:00
action_mailbox_gem.rb Add net/smtp gem for bug report templates to support Ruby 3.1 2021-06-07 00:15:21 +09:00
action_mailbox_main.rb Add net/smtp gem for bug report templates to support Ruby 3.1 2021-06-07 00:15:21 +09:00
active_job_gem.rb Update bug report templates to use Rails 6.1.0 2020-12-13 16:52:48 +09:00
active_job_main.rb Rename master to main in all code references 2021-01-19 20:46:33 +00:00
active_record_gem.rb Update bug report templates to use Rails 6.1.0 2020-12-13 16:52:48 +09:00
active_record_main.rb Rename master to main in all code references 2021-01-19 20:46:33 +00:00
active_record_migrations_gem.rb Update all Migration version references 2021-05-02 21:17:04 +09:00
active_record_migrations_main.rb Update all Migration version references 2021-05-02 21:17:04 +09:00
active_storage_gem.rb Update bug report templates to use Rails 6.1.0 2020-12-13 16:52:48 +09:00
active_storage_main.rb Rename master to main in all code references 2021-01-19 20:46:33 +00:00
benchmark.rb Revert "Lock benchmark-ips version "< 2.9.0"" 2021-05-25 06:13:09 +09:00
generic_gem.rb Update bug report templates to use Rails 6.1.0 2020-12-13 16:52:48 +09:00
generic_main.rb Rename master to main in all code references 2021-01-19 20:46:33 +00:00