Support for folks using chruby

This commit is contained in:
Craig Buchek 2019-06-23 14:53:36 -05:00 committed by Elliot Winkler
parent 892a912c67
commit b7b44a5013
1 changed files with 10 additions and 0 deletions

View File

@ -160,6 +160,16 @@ install-dependencies() {
banner "Installing Ruby $RUBY_VERSION with rbenv"
rbenv install --skip-existing "$RUBY_VERSION"
fi
elif has-executable chruby-exec; then
PREFIX='' source /usr/local/share/chruby/chruby.sh
if ! (chruby '' | grep $RUBY_VERSION'\>' &>/dev/null); then
if has-executable install-ruby; then
banner "Installing Ruby $RUBY_VERSION with install-ruby"
install-ruby "$RUBY_VERSION"
else
error "Please install Ruby $RUBY_VERSION"
fi
fi
elif has-executable rvm; then
if ! (rvm list | grep $required_ruby_version'\>' &>/dev/null); then
banner "Installing Ruby $required_ruby_version with rvm"