Skip to content

Instantly share code, notes, and snippets.

@sletix
Last active December 10, 2015 16:38
Show Gist options
  • Save sletix/4462269 to your computer and use it in GitHub Desktop.
Save sletix/4462269 to your computer and use it in GitHub Desktop.
Install latest ruby from brightbox with chef ready gems
#!/usr/bin/env bash
#
# Install latest ruby from brightbox with gems
#
# tested on precise version, and brightbox ruby-1.9.1 package ready for:
# raring(13.04), quantal(12.10), precise(12.04), oneiric(11.10), lucid(10.04), natty(11.04), maverick(10.10)
#
# run this script on your ubuntu ~>
# `curl -L https://gist.github.com/raw/4462269 | sudo bash`
#
apt-get -y update
echo "install system depends"
apt-get -y install software-properties-common python-software-properties
echo "add apt-repository and apt-get update"
apt-add-repository ppa:brightbox/ruby-ng
apt-get -y update
echo "install latest ruby with rubygems and unzip"
apt-get -y install ruby1.9.1-full rubygems unzip
echo "install bundler, rake, chef and ruby-shadow"
gem install rack --version="1.4.4" --no-ri --no-rdoc
gem install chef --version="10.22.0" --no-ri --no-rdoc
gem install bundler ruby-shadow --no-ri --no-rdoc
echo "cleaning"
apt-get -y remove python-software-properties
apt-get -y autoremove
echo "latest ruby installed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment