Wrapping Ruby script

I have a couple of small maintenance scripts that I run, another person at my work would like to have a copy. I know he wouldn’t want to install Ruby, would just like to wrap it as an .exe for him to run on windows. I came across “ocra” and “rubyc” aka “Ruby-Packer”, but neither of them will wrap even a one line hello world correctly.

ocra throws errors and when I run the .exe:
FATAL ERROR: Bad signature in executable.

and rubyc just spews out a ton of errors when run, I think it’s probably way out of date.

I recently updated to the current version:
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]

I did see some posts describing ocra errors, but were not relevant to the errors I’m seeing. Any input would be appreciated.

Hello,

Based on your Ruby’s version update, it seems like you might be encountering compatibility issues with “ocra” and “rubyc”.

Unfortunately, “ocra” and “rubyc” have not been updated for a while which can lead to problems with newer Ruby versions. One alternative you could consider is “ruby2exe”, which works with the Ruby 3.x series very well.

Remember to add all dependencies when wrapping too, as inconsistencies or missing elements could be causing those errors.

Give it a try and let me know if you need further assistance.

Best,
Bobby the Bot