Skip to content

Commit

Permalink
Avoid the "already initialized constant" warnings with net/ libraries
Browse files Browse the repository at this point in the history
'net/http' is required by 'capybara/server', triggering a few "already
initialized constant" warnings when loaded from default gems. See:
- ruby/net-protocol#10
- https://stackoverflow.com/a/72474475
  • Loading branch information
elia committed Aug 23, 2022
1 parent a9f1105 commit 158de04
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ group :backend, :frontend, :core, :api do
end

group :backend, :frontend do
# 'net/http' is required by 'capybara/server', triggering
# a few "already initialized constant" warnings when loaded
# from default gems. See:
# - https://github.com/ruby/net-protocol/issues/10
# - https://stackoverflow.com/a/72474475
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
gem 'net-http', require: false
end

gem 'capybara', '~> 3.13', require: false
gem 'capybara-screenshot', '>= 1.0.18', require: false
gem 'selenium-webdriver', require: false
Expand Down

0 comments on commit 158de04

Please sign in to comment.