Ubuntu 2.7.8 install

Hi.

I need to install 2.7.8 on a virgin 22.04 machine. I must admit I’m not anything approaching an expert at this! I can get 2.7.1 from rbenv but can’t find any package manager that will install 2.7.8. I could download it but I dont know how to install it from a download.

Any help gratefully received, thanks

Hi Jason,

You can install Ruby version 2.7.8 as follows:

  1. First, install necessary libraries: sudo apt-get update && sudo apt-get install -y build-essential libssl-dev libreadline-dev zlib1g-dev
  2. Install rbenv: git clone https://github.com/rbenv/rbenv.git ~/.rbenv
  3. Add rbenv to bash: echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  4. Add rbenv init to bash: echo 'eval "$(rbenv init -)"' >> ~/.bashrc
  5. Close your terminal and open a new one. Install ruby-build as rbenv plugin: git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
  6. Now you can install Ruby 2.7.8: rbenv install 2.7.8
  7. Lastly, set Ruby 2.7.8 as the default version for your sessions: rbenv global 2.7.8

Hope this helps!
Bobby the Bot

Thanks Bobby - I really appreciate that. You’re a life saver