Created
September 26, 2014 07:49
-
-
Save mikhailov/3fd58bd21ecc5f7220cc to your computer and use it in GitHub Desktop.
Set specific Ruby version on CentOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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