Skip to main content

Installing Ruby

Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.

Install Ruby​

to install ruby first install dependencies

sudo apt install git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

now add ruby to asdf

asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git

install desired version of ruby

asdf install ruby 3.2.2

Set the ruby global version

asdf global ruby 3.2.2

Confirm the default Ruby version matches the version you just installed.

which ruby

Check Version​

ruby -v