Skip to content

Instantly share code, notes, and snippets.

@mikhailov
Created September 26, 2014 07:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikhailov/3fd58bd21ecc5f7220cc to your computer and use it in GitHub Desktop.
Save mikhailov/3fd58bd21ecc5f7220cc to your computer and use it in GitHub Desktop.
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