From: Michal Suchanek Date: 2007-12-07T01:19:01+09:00 Subject: Re: Ruby App Distribution On 06/12/2007, Charles Oliver Nutter wrote: > Joe L wrote: > > I guess there really aren't many options right now. A cool solution would be an executable format like jar that worked on all platforms that was ruby specific. > > > > I feel like using a jar is a Java solution, while it might work... it's not Ruby. Someone else suggested using a Gem, but I don't want to require that of people. > > JRuby is Ruby. It's just implemented in a different language and runs on > a different VM. Don't think about JRuby in terms of Java. You'll miss > out if an anti-Java bias keeps you from trying something that might meet > your needs. It is ruby running on top of JVM. And the JVM is pretty good, I have seen and heard a lot of talk about how superior it is and what cool stuff it can do. And JRuby may be very good solution for some problems. However, the one-click-jar is far from portable. It uses Sun proprietary solution which runs "everywhere" (read: on the platforms for which they bothered to make a binary). It runs on Windows, at least the recent NT based. On OS X but it's usually a bit behind when new version is out, especially for people that do not have the newest OS X version as well. On Linux it runs on x86 and x86_64. It also runs on Solaris, and probably HP-UX. There is some ancient and incomplete port to ppc-linux by IBM, probably as a result of support for their something360. If you did not require Swing there are alternative VMs that are free (and free to compile on anything) but then you would be back to distributing binary extensions because you would need something like AWT which is not part of the Java standard library. Also these free alternative VMs do not have complete standard library. As far as I understand the issue the Java documentation license does not allow implementing a library complying with the documentation which is the primary reason why efforts at implementing complete alternative VMs did not get very far. Then there is that "write once run everywhere" thing with which Sun tries to push Java. If I have never heard that I would probably not get so much irritated whenever I hear about Java portability. Java software is *NO MORE* portable than C software. Given the proprietary nature of the VM it is actually *LESS* portable. It has all the common portability issues plus it won't run on platforms for which there is no JVM, ever. At least the Java software you meet in practice is swamped with compatibility problems. Most Java software requires specific minor version of the JVM, and with this one click approach you can hardly install several versions of the JVM. Yes, the JDK tools have the option to compile for older runtimes. I have yet to see this working. When java 1.5 came out, and our CMS software developer upgraded, everybody had to upgrade their runtime. He said he is compiling with the compatibility switch but it just did not work. Maybe it's just the Java crowd being mostly incompetent. I don't know. What's worse, I have seen a banking application that requires a specific patchlevel version (yes, specific -pn suffix). This same application also works only in IE, how portable. Even for applications that try, I have seen subtle input event handling differences between Windows and Linux, enough to break stuff. And an application that would not have sound on Linux - not sure if it simply did not work or it caused so much trouble they decided to turn it off. With these version and platform constraints you may need a quite large vmware stack if you want to run a number of Java applications :-> hmm, anyway, thanks for bringing ruby even to such a hostile environment for the benefit of those stuck in there ;-) Michal