Hacker News new | ask | show | jobs
by Alifatisk 676 days ago
Quick update, I tried some of the options I provided, here's the result.

OCRA seem to have a tiny issue with some missing files (fiber.so), so there are two forks that works pretty well with Ruby scripts that is also including gems. I tried both of them on a large script and it worked pretty well. The only downside is that it only supports Windows

OCRAN (https://rubygems.org/gems/ocran) Aibika (https://rubygems.org/gems/aibika)

Ignored RubyEncoder because it's commercial

DragonRuby is a whole toolkit, so I am not sure if it offers a quick cli to bundle a ruby script with its gems.

I tried rb2exe (https://rubygems.org/gems/rb2exe) but it required exactly Ruby version 2.2.2 (docker pull txt3rob/ruby-2.2.2-docker)

ruby2exe (https://rubygems.org/gems/ruby2exe) didn't work and looks abandoned

enclose-io/ruby (https://github.com/enclose-io/ruby) doesn't offer installation through RubyGems, same with Ruby-packer (https://github.com/pmq20/ruby-packer), so not going to try it

Portable-ruby (https://github.com/Homebrew/homebrew-portable-ruby) is just a project where you download a folder which has portable Ruby in it, nothing else. It does not bundle your script with it

RubyMotion costs, so I ignored it

Using TruffleRuby had a bit more steps and was complex, so I skipped it

MRuby did work, but not with the gems I was using, so I had to rely on their own libraries (https://mruby.org/libraries)

Crystal did work on simpler scripts but I had to adjust the code a bit to make it valid for the Crystal compiler.