Skip to content

Commit 117f09a

Browse files
committed
Fix sub-builds of other RSpec repos
See, e.g. https://github.com/rspec/rspec-mocks/runs/4951458449?check_suite_focus=true LoadError: cannot load such file -- net/smtp # /opt/hostedtoolcache/Ruby/3.1.0/x64/lib/ruby/gems/3.1.0/gems/activesupport-6.0.4.4/lib/active_support/dependencies.rb:324:in `require'
1 parent b8f65f3 commit 117f09a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Gemfile-rails-dependencies

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ when nil, false, ""
1919
gem "puma"
2020
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
2121
gem 'selenium-webdriver', require: false
22+
23+
# This is required for Ruby 3.1 and Rails 6.1.x as of time
24+
# of writing, because in Ruby 3.1 these gems are no longer
25+
# automatically included. This issue was fixed on the Rails
26+
# side in Rails 7.0.1, but is not yet fixed in the Rails 6.1.x
27+
# branch. Discussion can be found here - https://github.com/mikel/mail/pull/1439
28+
if RUBY_VERSION >= '3.1' && version.split(' ').last < '7.0'
29+
gem 'net-smtp', require: false
30+
gem 'net-imap', require: false
31+
gem 'net-pop', require: false
32+
end
2233
else
2334
gem "rails", version
2435
gem "sprockets", '~> 3.0' if RUBY_VERSION < '2.5'

0 commit comments

Comments
 (0)