2

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?

2

3 Answers 3

4

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.