Skip to content

Commit 8c35a0e

Browse files
JonRowepirj
authored andcommitted
Stop bundler 2 being installed on newer ruby
1 parent 78c65c5 commit 8c35a0e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

script/update_rubygems_and_install_bundler

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ set -e
66
source script/functions.sh
77

88
if is_ruby_23_plus; then
9-
yes | gem update --system
10-
yes | gem install bundler
9+
if ruby -e "exit(ENV['RAILS_VERSION'].scan(/\d+\.\d+.\d+/)[0].to_f >= 5)"; then
10+
yes | gem update --system
11+
yes | gem install bundler
12+
else
13+
echo "Warning installing older versions of Rubygems / Bundler"
14+
gem update --system '2.7.8'
15+
gem install bundler -v '1.17.3'
16+
fi
1117
else
1218
echo "Warning installing older versions of Rubygems / Bundler"
1319
gem update --system '2.7.8'

0 commit comments

Comments
 (0)