From 48f2f1aa07832b4fdc6ce1409644b102c07b0edb Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 28 May 2021 09:45:02 +0200 Subject: [PATCH] Add net-smtp, net-pop, net-imap and matrix to the Gemfile to fix the ruby-head build They were recently removed from Ruby's default gems. Ref: https://bugs.ruby-lang.org/issues/17873 Ref: https://github.com/mikel/mail/pull/1439 Ref: https://github.com/teamcapybara/capybara/pull/2468 --- Gemfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Gemfile b/Gemfile index 5983fafda0e90..01f34c5964247 100644 --- a/Gemfile +++ b/Gemfile @@ -169,3 +169,15 @@ end gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem "wdm", ">= 0.1.0", platforms: [:mingw, :mswin, :x64_mingw, :mswin64] + +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 + gem "net-imap", require: false + gem "net-pop", require: false + + # matrix was removed from default gems in Ruby 3.1, but is used by the `capybara` gem. + # So we need to add it as a dependency until `capybara` is fixed: https://github.com/teamcapybara/capybara/pull/2468 + gem "matrix", require: false +end