diff --git a/.gitignore b/.gitignore index 4303aeb293a..faa0d9c525d 100644 --- a/.gitignore +++ b/.gitignore @@ -33,7 +33,9 @@ app/stylesheets/brandable_css_brands /db/*sql /exports/ Gemfile.lock -Gemfile.lock5 +Gemfile.lock.24 +Gemfile.lock.5 +Gemfile.lock.24.5 /log/ mkmf.log /node_modules diff --git a/Gemfile.d/_before.rb b/Gemfile.d/_before.rb index bce72fef9cb..a5eaa370f4e 100644 --- a/Gemfile.d/_before.rb +++ b/Gemfile.d/_before.rb @@ -34,11 +34,14 @@ else end # force a different lockfile for rails 5 -unless CANVAS_RAILS4_2 +if !CANVAS_RAILS4_2 || RUBY_VERSION >= '2.4' Bundler::SharedHelpers.class_eval do class << self def default_lockfile - Pathname.new("#{Bundler.default_gemfile}.lock5") + lockfile = "#{Bundler.default_gemfile}.lock" + lockfile << ".24" if RUBY_VERSION > '2.4' + lockfile << ".5" unless CANVAS_RAILS4_2 + Pathname.new(lockfile) end end end