Skip to content

Commit 3fd46cf

Browse files
committed
Apply gem version constraints for older Rubies
Gem::RuntimeRequirementNotMetError: childprocess requires Ruby version >= 2.3.0. The current ruby version is 2.2.0. An error occurred while installing childprocess (3.0.0), and Bundler cannot continue. Make sure that `gem install childprocess -v '3.0.0' --source Gem::RuntimeRequirementNotMetError: nio4r requires Ruby version >= 2.3. The current ruby version is 2.2.0. An error occurred while installing nio4r (2.5.2), and Bundler cannot continue. Make sure that `gem install nio4r -v '2.5.2' --source 'https://rubygems.org/'` succeeds before bundling. Gem::RuntimeRequirementNotMetError: rack requires Ruby version >= 2.3.0. The current ruby version is 2.2.0. An error occurred while installing rack (2.2.3), and Bundler cannot continue. Make sure that `gem install rack -v '2.2.3' --source 'https://rubygems.org/'` succeeds before bundling. Gem::RuntimeRequirementNotMetError: i18n requires Ruby version >= 2.3.0. The current ruby version is 2.2.0. An error occurred while installing i18n (1.8.5), and Bundler cannot continue. Make sure that `gem install i18n -v '1.8.5' --source 'https://rubygems.org/'` succeeds before bundling.
1 parent 3c9e386 commit 3fd46cf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

example_app_generator/generate_app.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@
3333
gsub_file "Gemfile", /.*rails-controller-testing.*/, "gem 'rails-controller-testing', git: 'https://github.com/rails/rails-controller-testing'"
3434
end
3535

36+
if RUBY_VERSION < "2.3.0"
37+
gsub_file "Gemfile", /.*childprocess.*/, "gem 'childprocess', '< 2.0.0'"
38+
gsub_file "Gemfile", /.*i18n.*/, "gem 'i18n', '< 1.5.2'"
39+
gsub_file "Gemfile", /.*nio4r.*/, "gem 'nio4r', '< 2.4.0'"
40+
gsub_file "Gemfile", /.*public_suffix.*/, "gem 'public_suffix', '< 4.0.0'"
41+
gsub_file "Gemfile", /.*rack.*/, "gem 'rack', '< 2.2.0', '!= 2.1.0'"
42+
gsub_file "Gemfile", /.*xpath.*/, "gem 'xpath', '< 3.2.0'"
43+
end
44+
3645
if Rails::VERSION::STRING >= "5.1.0"
3746
if RUBY_VERSION < "2.3"
3847
gsub_file "Gemfile", /.*capybara.*/, "gem 'capybara', '~> 3.1.0'"

0 commit comments

Comments
 (0)