The exec command replaces current ruby process and the rest of the script is not executed. SOLVED