Sha256: b92c15f7b31412bd35ef2b83e9eff1d2c2441cb1fc5706bac319fc55cdf004d2

Contents?: true

Size: 631 Bytes

Versions: 1

Compression:

Stored size: 631 Bytes

Contents

#!/usr/bin/env bash

LATEST_RUBY_VERSION=`rbenv install --list | grep -v - | tail -1 | tr -d '[[:space:]]'`
echo "Installing Ruby $LATEST_RUBY_VERSION"

rbenv install $LATEST_RUBY_VERSION

echo "Setting $LATEST_RUBY_VERSION to global"
rbenv global $LATEST_RUBY_VERSION
rbenv rehash

if ! grep -qs "rbenv init" ~/.bashrc; then
  echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  echo 'eval "$(rbenv init -)"' >> ~/.bashrc
  eval "$(rbenv init -)"
fi

if ! grep -qs "rbenv init" ~/.zshrc; then
  echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
  echo 'eval "$(rbenv init -)"' >> ~/.zshrc
  eval "$(rbenv init -)"
fi

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
infinum_setup-0.1.0 scripts/ruby.sh