rails: 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 Debian possible default full paths are:

/usr/share/redmine/bin/rails - from package: redmine
/usr/bin/rails - from package: ruby-railties
/usr/lib/ruby/vendor_ruby/rails/generators/rails/app/templates/bin/rails - from package: ruby-railties

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