Skip to content

Instantly share code, notes, and snippets.

@makevoid
Last active May 18, 2019 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makevoid/3729f3397fe2fdeee9a7371ef551940e to your computer and use it in GitHub Desktop.
Save makevoid/3729f3397fe2fdeee9a7371ef551940e to your computer and use it in GitHub Desktop.
Install ruby 2.6 from source on debian 9
# example usage:
# bash <(curl -s https://gist.githubusercontent.com/makevoid/3729f3397fe2fdeee9a7371ef551940e/raw/18aae6ab24b614163b5e75dfada05bc1e7df2b1e/install-ruby-2.6-from-source-debian9.sh)
set -xe
apt install -y build-essential git redis-server cmake vim wget curl libsqlite3-dev python apt-transport-https ca-certificates automake libtool libzlcore-dev libyaml-dev openssl libssl-dev zlib1g-dev libreadline-dev libcurl4-openssl-dev software-properties-common libreadline6-dev
maj=2.6
min=3
vers="$maj.$min"
mkdir -p tmp
cd ~/tmp
wget https://cache.ruby-lang.org/pub/ruby/$maj/ruby-$vers.tar.gz && tar xvfz ruby-$vers.tar.gz
cd ~/tmp/ruby-$vers
./configure
make
make install
gem i bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment