How to build a ruby app that I can ship to somebody who doesn't have ruby?

Is there a way to bind a set of ruby source files into a self-running
executable that doesn’t require ruby already installed, like the unix
#! mechanism does?

Thanks,
Sam

For which OS?

Under Windows you can use exerb (but it makes very large files).
Under Unix, you could embed the ruby interpreter in a program. I’m not
sure if this still requires ruby to be installed.

I’ve been thinking about this problem for a while. Here is one idea:

  • Create a tar.gz (or zip) file with a ruby executable as well as
    the libraries that your app needs. Also include your app.
  • Optionally create an installer that copies all of this to certain
    directory.
  • Write a script that simply wraps around your app. For instance,
    if you wrote YourApp.rb, then write “YourApp.sh” which contains
    one line: “./ruby YourApp.rb”

This is not the cleanest solution. If a user downloads many such
programs, they end up with many copies of Ruby. But it would probably
work.

···

On Mon, Feb 10, 2003 at 04:07:03AM +0900, Sam Roberts wrote:

Is there a way to bind a set of ruby source files into a self-running
executable that doesn’t require ruby already installed, like the unix
#! mechanism does?

Thanks,
Sam


Daniel Carrera
Graduate Teaching Assistant. Math Dept.
University of Maryland. (301) 405-5137

#! doesn’t obviate the need for the interpreter, it just tells the OS
where to find it.

···

— Sam Roberts sroberts@uniserve.com wrote:

Is there a way to bind a set of ruby source files into a
self-running
executable that doesn’t require ruby already installed, like the
unix
#! mechanism does?

=====

Yahoo IM: michael_s_campbell


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.