Merge pull request #7807 from mkllnk/rbenv-install

Add convenience script to install Ruby
This commit is contained in:
Pau Pérez Fabregat
2021-07-01 13:53:54 +02:00
committed by GitHub

15
script/rbenv-install.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
#
# Install our selected Ruby version defined in the .ruby-version file.
#
# If our ruby-build version is outdated and it can't build the version we want
# then we try upgrading ruby-build and installing again.
if rbenv install --skip-existing; then
echo "Ruby is installed."
else
echo "Upgrading rbenv's ruby-build:"
git -C "$(rbenv root)"/plugins/ruby-build pull
rbenv install
fi