Skip to content

Instantly share code, notes, and snippets.

@harssh
Created June 27, 2024 15:54
Show Gist options
  • Save harssh/37a595af15ce750b8f4394442a3389a5 to your computer and use it in GitHub Desktop.
Save harssh/37a595af15ce750b8f4394442a3389a5 to your computer and use it in GitHub Desktop.
Install ruby on Ubuntu
#https://deanpcmad.com/2024/installing-older-ruby-versions-on-ubuntu-24-04-and-22-04/
rvm get head
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
tar zxvf openssl-1.1.1g.tar.gz
cd openssl-1.1.1g
./config --prefix=$HOME/.openssl/openssl-1.1.1g --openssldir=$HOME/.openssl/openssl-1.1.1g
make
make test
make install
rm -rf ~/.openssl/openssl-1.1.1g/certs
ln -s /etc/ssl/certs ~/.openssl/openssl-1.1.1g/certs
Install any ruby version with --with-openssl-dir option.
I installed ruby-2.6.5 like this:
rvm reinstall ruby-2.6.5 --with-openssl-dir=$HOME/.openssl/openssl-1.1.1g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment