1

I was wondering how you turn a ruby application (.rb) to an executable (.exe). As far as I know you can compile ruby on Mac and Linux with RVM but I can't use them because I'm on windows. So what I want to know is what is the alternative to RVM for Windows.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • See also http://stackoverflow.com/questions/18752249/run-ruby-program-on-computers-without-ruby-installed – knut Nov 09 '13 at 21:57
  • RVM has nothing to do with compiling Ruby scripts. It can compile the Ruby interpreter during installation if necessary. – the Tin Man Nov 10 '13 at 02:53

1 Answers1

0

You can use ocra to create an exe.

This exe-file is a self-extracting ruby interpreter with you code.

After installing ocra, you can start:

ocra my_application.rb

There are some restrictions/pitfalls:

  • You may not depend on additional dll (see e.g. Bundling RMagick with Ocra )
  • No conditioned requires (all packages must be called by the initial ocra call.).

You can check questions tagged ocra to see some details about ocra.

Community
  • 1
  • 1
knut
  • 27,320
  • 6
  • 84
  • 112
  • You can use it as in the command line. Enter `ocra my_application.rb`, where my_application.rb is your ruby programm. – knut Nov 09 '13 at 22:17
  • @user2974834 If this answer is your solution you could accept the answer. – knut Nov 10 '13 at 22:09