Im new to programming in ruby and actually wrote an program that I would like to
distribute to people that have windows computers and no ruby installed. I heard something about exerb but I'm not sure if this is the right thing for my issues or if there is something easier. Is there something I can use so that my ruby code can be run like an exe file?
-
Could this help? ruby-toolbox.com/categories/packaging_to_executablesJason Sperske– Jason Sperske2013-09-11 22:25:44 +00:00Commented Sep 11, 2013 at 22:25
-
ORCA seems to be the most popular by downloads: ocra.rubyforge.orgJason Sperske– Jason Sperske2013-09-11 22:26:20 +00:00Commented Sep 11, 2013 at 22:26
3 Answers
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.
Comments
Ruby is not machine code, but interpreted code, so you need an interpreter. So if the target platform doesn't have an interpreter, the code cannot run.
If you want your Ruby code to run without installing a Ruby interpreter on the host system, you will have to write and compile Windows software that bundles a Ruby interpreter and executes your Ruby software.
Comments
http://exerb.sourceforge.jp/index.en.html
Exerb is located here. It contains a ruby interpreter so it doesnt need one to be previously installed.