Last active
January 3, 2016 12:09
-
-
Save amercier/8461147 to your computer and use it in GitHub Desktop.
bash <(curl -# - L https://gist.github.com/amercier/8461147/raw)
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 | |
if [ "`whoami`" != "root" ]; then | |
echo "You must execute this script as root" >&2 | |
exit 1 | |
fi | |
VERSION=2.1.1 | |
URL=ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-$VERSION.tar.gz | |
echo ".-------------------." | |
echo "| Ruby installation |" | |
echo "'-------------------'" | |
cd \ | |
&& curl -# $URL > ruby-$VERSION.tar.gz \ | |
&& tar xvfz ruby-$VERSION.tar.gz \ | |
&& cd ruby-$VERSION \ | |
&& ./configure --disable-install-rdoc \ | |
&& make \ | |
&& make install \ | |
&& cd \ | |
&& rm -Rf ruby-$VERSION ruby-$VERSION.tar.gz \ | |
&& echo ".-----------------------------------------." \ | |
&& echo "| Ruby $VERSION installed successfully |" \ | |
&& echo "'-----------------------------------------'" \ | |
&& ruby --version \ | |
&& echo gem $(gem --version) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment