Skip to content

Instantly share code, notes, and snippets.

@geoyws
Forked from mdesantis/ruby-2-3-install.sh
Created August 4, 2022 17:09
Show Gist options
  • Save geoyws/4c693cabfa51d724e4efa0720e0837b4 to your computer and use it in GitHub Desktop.
Save geoyws/4c693cabfa51d724e4efa0720e0837b4 to your computer and use it in GitHub Desktop.
Install Ruby 2.3 on Ubuntu 19.10 using asdf (ruby-build)
#!/bin/bash
# It assumes [asdf](https://github.com/asdf-vm/asdf) to be installed
# and asdf plugin for Ruby to be added
set -exuo pipefail
sudo apt install libreadline-dev
wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz
tar -xzf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u
./config --prefix=/opt/openssl-1.0.2u --shared
make
make test
sudo make install
RUBY_BUILD_CACHE_PATH=$HOME/.ruby-build-cache \
RUBY_CONFIGURE_OPTS=--with-openssl-dir=/opt/openssl-1.0.2u \
PKG_CONFIG_PATH=/opt/openssl-1.0.2u/lib/pkgconfig \
asdf install ruby 2.3.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment