Skip to content

Commit 344865f

Browse files
committed
Downgrade Rails on Ruby 2.2
1 parent dfed7ab commit 344865f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Gemfile-rails-dependencies

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,31 @@ when /stable$/
2323
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]
2424

2525
gem_list.each do |rails_gem|
26-
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => version
26+
if version == '5-2-stable' && RUBY_VERSION < '2.3'
27+
# Until 5-2-stable is fixed on Ruby 2.2, pin to last working version
28+
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => "v5.2.0"
29+
else
30+
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => version
31+
end
2732
end
33+
2834
when nil, false, ""
2935
add_net_gems_dependency # TODO: remove when we use switch to "~> 7.0.0" that declares dependency on those gems on itself
3036
gem "rails", "~> 6.0.0"
3137
gem "puma"
3238
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
3339
gem 'selenium-webdriver', require: false
3440
else
35-
add_net_gems_dependency if version.split(' ').last < '7.0'
41+
rails_version = version.split(' ').last
42+
43+
add_net_gems_dependency if rails_version < '7.0'
44+
3645
gem "rails", version
46+
47+
if rails_version < '6.0' && RUBY_VERSION < '2.3'
48+
gem "activesupport", "~> 5.2", "!= 5.2.6.1", "!= 5.2.6.2"
49+
end
50+
3751
gem "sprockets", '~> 3.0' if RUBY_VERSION < '2.5'
3852
gem "puma"
3953
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]

0 commit comments

Comments
 (0)