Skip to content

Instantly share code, notes, and snippets.

@namick
Last active October 20, 2015 13:59
Show Gist options
  • Save namick/3949650 to your computer and use it in GitHub Desktop.
Save namick/3949650 to your computer and use it in GitHub Desktop.
Installs a good Ruby
# The version of Ruby to be installed
ruby_ver="2.2.3"
# The base path to the Ruby
ruby_home="/usr/local"
# Enable truly non interactive apt-get installs
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y install git-core
apt-get -y install curl
apt-get -y install build-essential
apt-get -y install zlib1g-dev libssl-dev libreadline-dev
apt-get -y install libxml2-dev libxslt-dev # needed by nokogiri/capybara
# Use ruby-build to install Ruby
clone_dir=/tmp/ruby-build-$$
git clone https://github.com/sstephenson/ruby-build.git $clone_dir
$clone_dir/bin/ruby-build "$ruby_ver" "$ruby_home"
rm -rf $clone_dir
unset clone_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment