Skip to content

Instantly share code, notes, and snippets.

@makevoid
Last active April 28, 2024 09:40
Show Gist options
  • Save makevoid/2be2170f17801c761aadfe7d9978b003 to your computer and use it in GitHub Desktop.
Save makevoid/2be2170f17801c761aadfe7d9978b003 to your computer and use it in GitHub Desktop.
Install Ruby 3 from soure on Debian (11)
# onliner usage:
# bash <(curl -s https://gist.githubusercontent.com/makevoid/2be2170f17801c761aadfe7d9978b003/raw/89e833034594b2db34322810c619b936fb96b192/install-ruby-3-debian.sh)
set -xeuo pipefail
apt update -y
apt install -y build-essential git redis-server cmake vim wget curl libsqlite3-dev python3 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
mkdir -p ~/tmp
cd ~/tmp
wget https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.1.tar.xz
tar -xvf ruby-3.3.1.tar.xz
cd ruby-3.3.1/
./configure
make
make install
gem i -N bundler
gem update --system
chown -R admin:admin /usr/local/lib/ruby/gems/3.3.0
chown -R admin:admin /usr/local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment