Jan 30, 2026

Setup Ruby on Ubuntu 24.04

Here I have compiled a set of actions that allows me to quickly deploy everything I need on a clean Ubuntu server or a local machine.

Install very basic dependencies and make zsh act as default shell.

sudo apt update 
sudo apt install git zsh
# Install oh-my-zsh 
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Install tools and libs required by Ruby

sudo apt install build-essential rustc libssl-dev libyaml-dev zlib1g-dev libgmp-dev

Install Mise to manage ruby, node, go and whatever versions.

curl https://mise.run | sh

Install latest (4.0.1) Ruby with mise and update Rubygems

mise use -g ruby@latest 

# Check 
ruby -v 
# => ruby 4.0.1 (2026-01-13 revision e04267a14b) +PRISM [x86_64-linux]

gem update --system