[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Ruby App Distribution

Joe L

12/5/2007 12:17:00 AM

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

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

<Excerpt>
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 Britt <james.britt@gmail.com> 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 Britt

"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




---------------------------------
Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.
2 Answers

Charles Oliver Nutter

12/6/2007 5:44:00 AM

0

Joe L wrote:
> http://wiki.jruby.org/wiki/JRub... I was looking through the information there. There seems to be a lot it doesn't support.
>
> <Excerpt>
> 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)

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

Charles Oliver Nutter

12/6/2007 5:46:00 AM

0

Joe L wrote:
> http://wiki.jruby.org/wiki/JRub... I was looking through the information there. There seems to be a lot it doesn't support.
>
> <Excerpt>
> 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)

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