Building a Windows executable from my Ruby app?

前端 未结 5 556
误落风尘
误落风尘 2021-01-31 10:42

I\'d like to be able to send a Ruby app to some colleagues without requiring them to install a Ruby interpreter. A single exe would be preferable.

I googled and found \"

相关标签:
5条回答
  • 2021-01-31 10:55

    I've used it about 3 times and I haven't had any problems with it and I ran one of the apps on 10 servers and never had any issues. So, I think RubyScript2Exe is about as good as it gets for ruby.

    0 讨论(0)
  • 2021-01-31 11:01

    _why's Shoes framework lets you package the program as an executable for Mac or Windows that installs Shoes (contains a Ruby interpreter). Information about using the packager is here. _why also gives hints about how he makes the Windows executable here.

    0 讨论(0)
  • 2021-01-31 11:03

    Don't forget OCRA [1] which I used a couple of times and which Just Worked. I used to create my exes with RubyScript2Exe as mentioned above but had problems when used with Ruby 1.9 [2].

    [1] http://ocra.rubyforge.org/
    [2] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/343891

    0 讨论(0)
  • 2021-01-31 11:03

    Sorry to be late to the party, but I found this question in my search for trying to do this myself (starting to use SO more and more as a primary resource).

    Anyway, I have just had success with exerb, although I'd add a couple of notes:

    • The web page says exerb runs on any platform. That is true; however if you "compile" a program calls out to native code, then exerb will embed your system's native code (e.g. Linux .so files) into the .exe. In practice, that means you have to build any significant app on Windows.
    • The web page also says ruby -r exerb/mkrbc but the actual command is ruby -r exerb/mkexy.
    0 讨论(0)
  • 2021-01-31 11:09

    There is another one called Crate. You can find some information about it here. However I haven't tested it on Windows.

    0 讨论(0)
提交回复
热议问题