Skip to content

Commit 539a67d

Browse files
committed
Lock Capybara basing on its Ruby constraints
Fetching capybara 3.33.0 Installing capybara 3.33.0 Gem::RuntimeRequirementNotMetError: capybara requires Ruby version >= 2.5.0. The current ruby version is 2.4.10.364. An error occurred while installing capybara (3.33.0), and Bundler cannot continue. Make sure that `gem install capybara -v '3.33.0' --source 'https://rubygems.org/'` succeeds before bundling.
1 parent e1c36a5 commit 539a67d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,12 @@ gem 'rake', '~> 12'
4949

5050
gem 'mime-types', "~> 3"
5151

52-
if RUBY_VERSION.to_f == 2.2
52+
if RUBY_VERSION.to_f < 2.3
5353
gem 'capybara', '~> 3.1.0'
54+
elsif RUBY_VERSION.to_f < 2.4
55+
gem 'capybara', '< 3.16'
56+
elsif RUBY_VERSION.to_f < 2.5
57+
gem 'capybara', '< 3.33'
5458
else
5559
gem 'capybara', '>= 2.13', '< 4.0', require: false
5660
end

0 commit comments

Comments
 (0)