Let's say that I was writing a closed sourced commercial piece of software which was to be deployed in the following situations: Windows Desktop App built on .Net, ActiveX control, Windows Netscape plugin, Mac Desktop App built on Cocoa, Mac Netscape plugin, Java applet hosted in browser. Would it be viable in terms of code sharing to write my model and controller classes in shared Ruby source files and use MacRuby, IronRuby and JRuby to integrate into the various runtimes? My view classes would presumably be written to use WPF on Windows, Cocoa on the Mac and whatever was appropriate on Java (SWT?).
From my point of view, the most important thing here is long term maintenance of the codebase, and it seems as though Ruby is as close to being a first class language on the three platforms I have to target: .Net, Cocoa and Java, as any language. Am I mistaken in this?
Second in importance is to avoid any viral license requirements on our code. I see where JRuby is released under various licenses; am I right to assume I can distribute binaries and the licenses do not apply to any Ruby files I write for my own application (as opposed to modifications of their framework.)
Has Ruby been used in any well known desktop applications? Has this been done before?
It's possible, although I'd be a little wary of the approach you've outlined: IronRuby isn't 1.0 yet, for example.
Are you expecting much OS-specific work beyond the UI? If not then I'd start by looking at WxRuby, which is a (fairly thin) wrapper of the cross-platform WxWidgets library. Don't work too hard looking for good documentation of the Ruby wrapper, btw - painful experience has taught me to look at the example code, which is actually very comprehensive.
Other platform specific stuff should probably be abstracted/encapsulated away behind some sort of wrapper/facade/api/proxy (pick your pattern).
You say "closed source" - did you have a strategy for that in a Ruby context? While there are at least a couple of tools (ruby2exe and RubyScript2exe) that I've seen, I don't know how hidden your Ruby code will actually be. Does it need to be a standalone, deployed executable at all, or could it be browser-based? That would solve all the cross-platform issues (although you might be running face-first into cross-browser ones instead).
There's some more discussion (including Python, which is another alternative) in this SO question