Configure Ruby Environment on Ubuntu
This is a simple guide for configuring a Ruby 2 environment on Ubuntu. This was tested for Ruby 2.7.2 on Ubuntu 22.04.3. All scripts are bash
.
Compilers
rvm
rvm
is a Ruby version manager
Install:
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s -- stable --ignore-dotfiles
Test:
Ruby
Install via rvm
:
source ~/.rvm/scripts/rvm
rvm pkg install openssl
rvm install 2.7.2 --with-openssl-dir=$HOME/.rvm/usr
Test: