Skip to content

Instantly share code, notes, and snippets.

@jjasonclark
Last active December 19, 2015 16:58
Show Gist options
  • Save jjasonclark/5987491 to your computer and use it in GitHub Desktop.
Save jjasonclark/5987491 to your computer and use it in GitHub Desktop.
Ruby install script
# Install Ruby
if [ "`ruby --version | cut -d' ' -f2`" != "1.9.3p429" ] ; then
yum -y install kernel-devel gcc gcc-c++ automake autoconf make dmidecode zlib zlib-devel readline readline-devel openssl openssl-devel patch libtool libyaml-devel libffi-devel libxml2-devel libxslt-devel
mkdir -p /tmp/ruby
cd /tmp/ruby
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz -q
tar xvf ruby-1.9.3*.tar.gz
cd ruby-1.9.3*
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
./configure --enable-shared --disable-pthread --prefix=/usr --disable-install-doc
make
make install
cd
rm -rf /tmp/ruby
fi
# Install Rails
gem list rails -i -v '3.2.13' > /dev/null
if [ $? -ne 0 ] ; then
gem install rails -v '3.2.13' --no-rdoc --no-ri
fi
# Install bundler
gem list bundler -i -v '1.3.5' > /dev/null
if [ $? -ne 0 ] ; then
gem install bundler -v '1.3.5' --no-ri --no-rdoc
fi
# Install chef
gem list chef -i -v '10.18.2' > /dev/null
if [ $? -ne 0 ] ; then
gem install --no-ri --no-rdoc net-ssh -v 2.2.2
gem install --no-ri --no-rdoc net-ssh-gateway -v 1.1.0 --ignore-dependencies
gem install --no-ri --no-rdoc net-ssh-multi -v 1.1.0 --ignore-dependencies
gem install --no-ri --no-rdoc chef -v '10.18.2'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment