====== chruby ====== Install Ubuntu ruby prerequisites, otherwise you will be asked to use sudo even for a user install though you can/may have to force ''ruby-install'' to skip dependencies with ''--no-install-deps'': * ''sudo apt install -y build-essential bison zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libffi-dev'' Install: * [[https://github.com/postmodern/chruby|chruby]] * [[https://github.com/postmodern/chruby/wiki/Ruby|rubies]] * [[https://github.com/postmodern/ruby-install#install|ruby-install]] Check ''.zshrc'' is ''source''ing ''/usr/local/share/chruby/chruby.sh'' and ''/usr/local/share/chruby/auto.sh'' for autoswitching. Restart terminals. Start installing: ''ruby-install 3.1'' installs the latest stable version of 3.1. ===== Installing for a user without sudo ===== ''ruby-install'' heavily relies on hopping into sudo mid-install to satisfy dependencies. I haven't been able to get this to install for a user without sudo access. However, installing for a sudoer and then manually moving the ''.rubies/ruby-3.X.X'' directory to the non-sudoer user directory and ''sudo chown -R user.user /home/user/.rubies'' seems to work. * Once the prereqs are installed, can more rubies be installed the vanilla way?