Skip to content

Commit afd6ea2

Browse files
committed
Restore bundler downgrade behaviour
1 parent 39cbd9e commit afd6ea2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

script/downgrade_bundler_on_old_rails

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ if ruby -e "exit(ENV['RAILS_VERSION'].scan(/\d+\.\d+.\d+/)[0].to_f < 5)"; then
99
# On Rails versions less than 5, Bundler 2.0 is not supported
1010
echo "Warning dowgrading to older version of Bundler"
1111

12-
# Delete all bundler version because we do not support Bundler 2+ below Rails 4
13-
rvm @global do gem uninstall -aIx bundler || echo "Warning error occured removing bundler via rvm"
12+
gem uninstall -aIx bundler || echo "Warning error occured removing bundler via gem"
13+
14+
# this only works on Ruby 2.3 which is luckily the version we need to fix
15+
if is_ruby_23; then
16+
rvm @global do gem uninstall -aIx bundler || echo "Warning error occured removing bundler via rvm"
17+
fi
1418

1519
gem install bundler -v '1.17.3'
1620
fi

0 commit comments

Comments
 (0)