ruby: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/ruby - from package: ruby

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/ruby - from package: ruby
/usr/lib/ruby-standalone/bin/ruby - from package: ruby-standalone

You may install the required package with command apt-get install {package}
Error in other languages:
ruby: bevel nie gevind nie
ruby: comandă negăsită
ruby: comando não encontrado
ruby: commande introuvable
ruby: command not found
ruby: käsku ei ole
ruby: không tìm thấy lệnh
ruby: komanda nerasta
ruby: Kommando nicht gefunden.
ruby: kommandot finns inte
ruby: komut yok
ruby: nie znaleziono polecenia
ruby: níor aimsíodh an t-ordú
ruby: no se encontró la orden
ruby: no s'ha trobat l'ordre
ruby: opdracht niet gevonden
ruby: parancs nem található
ruby: perintah tidak ditemukan
ruby: príkaz nenájdený
ruby: příkaz nenalezen
ruby: команда не найдена
ruby: командата не е открита
ruby: 命令找不到
ruby: コマンドが見つかりません