Recorded scripts do not work with Ruby

When I export the recorder scripts, i select Ruby option from the available drop down.
However, when i paste the code into my editor, and try to run, i get errors.
Is there any other way of doing this, record in katalon and run in ruby?
Can you please help?