How To Install Ruby On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?
Maintainer: Antonio Terceiro
Email: [email protected] .
Website: https://www.ruby-lang.org/
Section: ruby
Install ruby
-
Debian
apt-get install rubyClick to copy -
Ubuntu
apt-get install rubyClick to copy -
Alpine OS
apk add rubyClick to copy -
Arch Linux
pacman -S rubyClick to copy -
Kali Linux
apt-get install rubyClick to copy -
CentOS
yum install rubyClick to copy -
Fedora
dnf install rubyClick to copy -
Raspbian
apt-get install rubyClick to copy -
macOS
brew install rubyClick to copy
Ruby programming language interpreter.
How to use ruby?
Below are few example commands for ruby that you can use in the terminal.
Open an Interactive Ruby Shell (REPL):irbClick to copyExecute a Ruby script:ruby script.rbClick to copyExecute a single Ruby command in the command line:ruby -e commandClick to copyCheck for syntax errors on a given Ruby script:ruby -c script.rbClick to copyShow the version of Ruby you are using:ruby -vClick to copy
To install the latest version of ruby in your favorite operating system just copy the ruby installation command from above and paste it into terminal. It will download and install the latest version of ruby 2026 package in your OS.




