Created
September 26, 2012 09:05
-
-
Save vifo/3786925 to your computer and use it in GitHub Desktop.
Ruby: Install Ruby 1.9.3-p327 via rvm with cumulative performance patch
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
#!/usr/bin/env bash | |
# | |
# This script will install Ruby 1.9.3-p327 via rvm with additional performance | |
# patches for faster Rails boot. Please refer to | |
# | |
# https://gist.github.com/1688857 | |
# | |
# for detailed information. Run directly with: | |
# | |
# curl https://raw.github.com/gist/3786925/install.sh | bash | |
# install build dependencies on Ubuntu | |
if [ -x "/usr/bin/lsb_release" ]; then | |
distributor_id=$(/usr/bin/lsb_release -is) | |
if [ "${distributor_id}" == "Ubuntu" ] || [ "${distributor_id}" == "LinuxMint" ]; then | |
apt-get update && apt-get install build-essential libyaml-dev | |
# remove aliases on Ubuntu | |
unalias cp mv >/dev/null 2>&1 | |
fi | |
fi | |
export LANG=en_US.utf8 | |
export CFLAGS="-march=native -O3 -Wall -pipe -fomit-frame-pointer -fno-strict-aliasing" | |
export CXXFLAGS="${CFLAGS}" | |
rvm get head && rvm reload && rvm reinstall 1.9.3-perf --patch falcon --force-autoconf -j 3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment