rake: 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/rake - from package: rubygem-rake
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake - from package: rubygem-rake

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

On Debian possible default full paths are:

/usr/bin/rake - from package: rake
/usr/lib/ruby/gems/2.1.0/gems/rake-10.1.0/bin/rake - from package: libruby2.1
/usr/share/redmine/bin/rake - from package: redmine
/usr/lib/ruby/vendor_ruby/rails/generators/rails/app/templates/bin/rake - from package: ruby-railties
/usr/lib/ruby-standalone/bin/rake - from package: ruby-standalone

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