We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca8dec7 commit fbf32fbCopy full SHA for fbf32fb
script/update_rubygems_and_install_bundler
@@ -2,6 +2,20 @@
2
3
set -e
4
5
-echo "Installing latest rubygems / bundler"
6
-yes | gem update --system
7
-yes | gem install bundler
+function is_ruby_31_plus {
+ if ruby -e "exit(RUBY_VERSION.to_f >= 3.1)"; then
+ return 0
8
+ else
9
+ return 1
10
+ fi
11
+}
12
+
13
+if is_ruby_31_plus; then
14
+ echo "Installing most recent rubygems / bundler"
15
+ yes | gem update --system
16
+ yes | gem install
17
+else
18
+ echo "Installing rubygems 3.2.22 / bundler 2.2.22"
19
+ yes | gem update --system '3.2.22'
20
+ yes | gem install bundler -v '2.2.22'
21
+fi
0 commit comments