Skip to content

Commit 7e9eb79

Browse files
committed
fix to check bundler exists or not before install: rubinius have bundler by default
1 parent fbf05d0 commit 7e9eb79

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ruby-install

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ fi
6565

6666
(
6767
export PATH="$LOCATION"/bin:"$PATH"
68-
"$LOCATION"/bin/gem install --no-rdoc --no-ri bundler pry > /tmp/$USER-ruby-install-bundler.log 2>&1
68+
gems="pry"
69+
bundle_path=$(which bundle)
70+
if [ "x"$bundle_path = "x" ]; then
71+
gems="bundler $gems"
72+
fi
73+
"$LOCATION"/bin/gem install --no-rdoc --no-ri $gems > /tmp/$USER-ruby-install-bundler.log 2>&1
6974
) || (echo "gem install failed. see log /tmp/$USER-ruby-install-bundler.log" && exit 2)
7075

7176
echo "ruby $TARGET_VERSION successfully installed on $LOCATION"

0 commit comments

Comments
 (0)