Ruby App Distribution

Hi,

I was wondering what are the options for distributing a ruby
application. Java has the jar and C++ you can compile to an exe. What
options does Ruby provide? I’m not looking to distribute anything
before the next release. I don’t know if something is being added with
Yarv to aide in distribution. Any info would be great.

Thanks,
Joe

  ____________________________________________________________________________________

Be a better sports nut! Let your teams follow you
with Yahoo Mobile. Try it now.
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

On Dec 4, 9:25 am, Joe L [email protected] wrote:

I was wondering what are the options for distributing a ruby application. Java has the jar and C++ you can compile to an exe. What options does Ruby provide? I’m not looking to distribute anything before the next release. I don’t know if something is being added with Yarv to aide in distribution. Any info would be great.

Take a look at: http://www.erikveen.dds.nl/ruby.html .

You’ll find some options there. Tar2RubyScript packages all the files
that comprise a Ruby program into a single file that can be run on a
machine that already has Ruby installed. RubyScript2Exe goes a step
further, and incorporates the Ruby interpreter and all required
libraries into the single file as well, so the target machine doesn’t
even have to have Ruby installed.

Eric

====

Interested in hands-on, on-site Ruby training? See http://LearnRuby.com
for information about a well-reviewed class.

Joe L wrote:

Hi,

I was wondering what are the options for distributing a ruby application. Java has the jar and C++ you can compile to an exe. What options does Ruby provide? I’m not looking to distribute anything before the next release. I don’t know if something is being added with Yarv to aide in distribution. Any info would be great.

Using JRuby you can package up a Ruby app and distribute it as a
clickable jar file.


James B.

“Trying to port the desktop metaphor to the Web is like working
on how to fuel your car with hay because that is what horses eat.”
- Dare Obasanjo

James B. wrote:

Using JRuby you can package up a Ruby app and distribute it as a
clickable jar file.

Is that feature available inside JRuby? How do you do it? I was under
the assumpion that JarJar was needed for that.

Best regards,

Jari W.

http://wiki.jruby.org/wiki/JRuby_Compiler I was looking through the
information there. There seems to be a lot it doesn’t support.

Notable things that do not compile in either safe or unsafe mode:

class and module definitions
singleton class and method definitions
blocks with arguments
method defs with optional, “rest”, or block arguments
some method calls are unsafe, like “block_given?” and
“local_variables”
splats and multiple assignment (a, b = b, a)

I’d prefer to stick with the official implementation if possible. JRuby
doesn’t support C extensions. I was hoping to use wxRuby for a GUI.

James B. [email protected] wrote: Joe L wrote:

Hi,

I was wondering what are the options for distributing a ruby application. Java has the jar and C++ you can compile to an exe. What options does Ruby provide? I’m not looking to distribute anything before the next release. I don’t know if something is being added with Yarv to aide in distribution. Any info would be great.

Using JRuby you can package up a Ruby app and distribute it as a
clickable jar file.


James B.

“Trying to port the desktop metaphor to the Web is like working
on how to fuel your car with hay because that is what horses eat.”
- Dare Obasanjo

Joe L wrote:

splats and multiple assignment (a, b = b, a)
That’s old, thanks for calling my attention to it. The JRuby compiler
has been complete for about a month, and can compile all Ruby code in
the stdlib (so it’s pretty solid).

If you’re interested in a cross-platform GUI library, there’s a number
of frameworks for building Swing-based apps. Write it, package it up
into a JAR file, and anyone with Java can run it without trouble. To me,
it seems like the best/easiest way to get a cross-platform Ruby GUI app.

  • Charlie

Joe L wrote:

splats and multiple assignment (a, b = b, a)
Actually, it’s also worth mentioning that JRuby’s had an interpreted
mode (similar to Ruby 1.8.x) forever, so you don’t even need to compile
the Ruby code to run it. It just works, pretty much like running the C
implementation. And as it runs, JRuby will compile it for you, resulting
in performance improving at runtime.

  • Charlie

Is it possible to use wxRuby or FXRuby with JRuby? I’m just asking
because I was hoping to use one of them.

I’ve used Swing in the past, it looks like it might be less verbose when
writing in in Ruby.

Joe

Charles Oliver N. [email protected] wrote: Joe L wrote:

splats and multiple assignment (a, b = b, a)
That’s old, thanks for calling my attention to it. The JRuby compiler
has been complete for about a month, and can compile all Ruby code in
the stdlib (so it’s pretty solid).

If you’re interested in a cross-platform GUI library, there’s a number
of frameworks for building Swing-based apps. Write it, package it up
into a JAR file, and anyone with Java can run it without trouble. To me,
it seems like the best/easiest way to get a cross-platform Ruby GUI app.

  • Charlie

Joe L wrote:

Is it possible to use wxRuby or FXRuby with JRuby? I’m just asking because I was hoping to use one of them.

There’s no JRuby-compatible version of the gem, but there is a wxWidgets
binding for Java:

http://www.wx4j.org/

It would probably be trivial to produce a JRuby-compatible wxRuby gem
using that library. But it does have native dependencies then, so I’d
still recommend Swing.

I didn’t find a Fox binding for Java, but there’s probably one out there
somewhere.

I’ve used Swing in the past, it looks like it might be less verbose when writing in in Ruby.

It’s a lot nicer than writing it in Java, and there’s four or five
different Swing-based frameworks available for JRuby now.

  • Charlie

Joe L wrote:

Is it possible to use wxRuby or FXRuby with JRuby?

No, both these are platform-specific, C-based implementations.

I’ve used Swing in the past, it looks like it might be
less verbose when writing in in Ruby.

A lot less verbose. Here are your current JRuby GUI alternatives:
http://wiki.jruby.org/wiki/GUI_Frameworks

Best regards,

Jari W.