I'm playing around with Ruby on TIC-80. So far, this is what I've learned.
You can set the script on an existing cart by changing the "script" line. Don't do this. Instead, create a brand new cart with "new ruby". that way the new cart will have the correct comment markers and the syntax highlighting will work.
Be sure to use the TIC80 API instead of the Ruby system functions. print() works great but puts() doesn't.