# Expected by RVM, seems required to make RVM functions (`rvm use`) available
# Silence absurdly verbose rvm output by temporally not echoing commands
set +x
+# Source line has a non-zero exit somewhere, that RVM doesn't mean to indicate
+# a real failure, but causes our jobs to fail when fail-on-errors is enabled.
+set +e
# shellcheck disable=SC1090
source "$HOME/.rvm/scripts/rvm"
-rvm install 2.4.0
+set -e
+rvm install 2.6.0
set -x
ruby --version
# This has to be done as a login shell to get rvm fns
# https://rvm.io/support/faq#what-shell-login-means-bash-l
# http://superuser.com/questions/306530/run-remote-ssh-command-with-full-login-shell
-bash -lc "rvm use 2.4.0 --default"
+bash -lc "rvm use 2.6.0 --default"
ruby --version
+# Update RubyGems using itself, as OS package may be old
+# Ran into RubyGems 2.x installed by OS, 3.x required by Bundler in INTPAK-230
+gem update --system
+
# Install gems dependencies of puppet-opendaylight via Bundler
gem install bundler
echo export PATH="\\$PATH:/usr/local/bin" >> "$HOME/.bashrc"