I\'m on a Mac and sometimes I use the say command at the end of my scripts, like so:
say
system(\'say \"Finished successfully\"\')
But
Remove backticks (Kernel#`):
system("say \"#{my_variable}\"")
or
system("say '#{my_variable}'")