Eu fiz uma postagem cruzada da minha pergunta para stackoverflow.com, onde recebi a resposta;)
Restarting a application is a bad workaround, not a solution.
i recommend to review the documentation of your bot, look for a option to configure after how many bad retries it exits or how to disable this functionality completely. if the bot is open source, you can also review its source code and modify the retry code. Try to find a clean solution.
if you really want to restart it, i would create a shellscript that runs the bot in a loop. make sure bot.rb does not fork into the background:
#/bin/bash for (( ; ; )) do ./bot.rb done
you can run that script with
nohup ./startscript.sh &
so it does not terminate if you close the console.