Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set specific Ruby version on CentOS
#/bin/bash -e
RUBY_VERSION=2.0.0
if [ "$RUBY_VERSION" == '2.0.0' ]; then
yum -y install ruby20 rubygems20 ruby-devel
alternatives --set ruby /usr/bin/ruby2.0
elif [ "$RUBY_VERSION" == '1.9.3' ]; then
yum -y install ruby19 rubygems19 ruby19-devel
alternatives --set ruby /usr/bin/ruby1.9
elif [ "$RUBY_VERSION" == '1.8.7' ]; then
yum -y install ruby18 rubygems18 ruby18-devel
alternatives --set ruby /usr/bin/ruby1.8
else
exit 1
fi
gem install bundler --no-ri --no-rdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment