From c5a681b9b1287ee9530db321a9977dc5bb7c5d0f Mon Sep 17 00:00:00 2001 From: Tyler Rick Date: Wed, 24 Feb 2021 01:06:40 -0800 Subject: [PATCH] Fix test failures on Rails < 6 due to sprockets >= 4 --- Gemfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 43b7429..271a87e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,11 @@ source 'https://rubygems.org' gemspec -gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION'] +if ENV['RAILS_VERSION'] + gem 'rails', ENV['RAILS_VERSION'] + if ENV['RAILS_VERSION'][/\d.*/] >= '6.0.0' + # use latest (4.x) + else + gem 'sprockets', '~> 3.0' + end +end