# Deploy a Ruby program & GUI connection

**URL:** <https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637>\
**Category:** Ruby\
**Created:** [May 23, 2009, 9:46am UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637 "2009-05-23T09:46:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianunderwater](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Post date:** [May 23, 2009, 9:46am UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637/1 "2009-05-23T09:46:52Z")

</div>

I have some Java experience and jus try to understand Ruby  
I have two problems:  
First: how can I deploy a ruby app. Is there something like jar? or the  
application is started allwais going to the command line? The source  
files can’t be hidden and/or protected?  
And the second:  
From Java I now that is better to code yourself the GUI and not to use a  
GUI maker, but in Ruby must I learn Tk?, this beeing presented in the  
“Programming Ruby - The Pragmatic Programmer’s Guide”  
I have seen an IDE called wxFormBuilder wich make the GUI developement  
very easy, but how do I connect the code to a ruby program? I looked  
around the web and in some Ruby books and I didn’t find a explenation.  
A simple example will be great: a file made with wxFormBuilder wich  
takes two numbers in two text fields, and two buttons one for  
multiplication and one for division, with output to another text field.  
I think such explenation will help a lot of people in their first steps  
in Ruby  
Thanks

---

<div class="post-metadata">

**Author:** ![adrianunderwater](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Post date:** [May 23, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637/2 "2009-05-23T17:49:51Z")

</div>

On May 23, 2009, at 12:46 AM, Adrian A. wrote:

> “Programming Ruby - The Pragmatic Programmer’s Guide”  
> I have seen an IDE called wxFormBuilder wich make the GUI developement  
> very easy, but how do I connect the code to a ruby program? I looked  
> around the web and in some Ruby books and I didn’t find a explenation.  
> A simple example will be great: a file made with wxFormBuilder wich  
> takes two numbers in two text fields, and two buttons one for  
> multiplication and one for division, with output to another text  
> field.  
> I think such explenation will help a lot of people in their first  
> steps  
> in Ruby

Adrian,  
I highly recommend you take a look at Monkeybars - A JRuby library  
that cleanly handles Swing. You can use a variety of ways to build the  
UI/layout, all of which Monkeybars is agnostic to. This way you can do  
some GUI development with Ruby while also capitalizing on your Java/  
Swing experience.  
[http://monkeybars.rubyforge.org/](http://monkeybars.rubyforge.org/)  
Right now we’re moving to Kenai, so everything may not be linked up yet.  
[http://kenai.com/projects/monkeybars/](http://kenai.com/projects/monkeybars/)  
Our mailing list is very active and probably the best place to go for  
help:  
[http://kenai.com/projects/monkeybars/lists/users/archive](http://kenai.com/projects/monkeybars/lists/users/archive)

Logan B.  
removed\_email\_address@domain.invalid  
[http://www.logustus.com](http://www.logustus.com)

---

<div class="post-metadata">

**Author:** ![adrianunderwater](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Post date:** [May 23, 2009, 5:51pm UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637/3 "2009-05-23T17:51:01Z")

</div>

On May 23, 3:46 am, Adrian A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## very easy, but how do I connect the code to a ruby program? I looked around the web and in some Ruby books and I didn’t find a explenation. A simple example will be great: a file made with wxFormBuilder wich takes two numbers in two text fields, and two buttons one for multiplication and one for division, with output to another text field. I think such explenation will help a lot of people in their first steps in Ruby Thanks
> 
> Posted viahttp://www.ruby-forum.com/.

Ruby apps are typically deployed as gems. Yes, your source is as plain  
as day, but is that really _so_ much different than Java, given the  
ease of disassembling bytecode (and the numerous tools that do a  
fantastic job of it)? Also bindings for just about every graphics  
toolkit known to man exist for Ruby, a simple google search will help  
you with that. One of the more interesting approaches to this though  
is [http://shoooes.net/](http://shoooes.net/), you should give it a look.

---

<div class="post-metadata">

**Author:** ![adrianunderwater](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Post date:** [May 24, 2009, 12:23am UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637/4 "2009-05-24T00:23:21Z")

</div>

pharrington wrote:

> One of the more interesting approaches to this though  
> is [http://shoooes.net/](http://shoooes.net/), you should give it a look.

Shoes, if I understand correctly, doesn’t install into your existing  
Ruby environment. It comes with an independent Ruby environment.

In other words, Shoes is an anathema to the Free World (because you  
can’t install just Shoes; you have to install, and manage, its own  
Ruby).

---

<div class="post-metadata">

**Author:** ![adrianunderwater](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Post date:** [May 23, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637/5 "2009-05-23T20:07:08Z")

</div>

On May 23, 2009, at 8:50 AM, pharrington wrote:

> Ruby apps are typically deployed as gems.

Monkeybars apps built with Rawr (the standard build tool) can go out  
as standalone .app and .exe files - no Ruby installation (let alone  
gems) are necessary.

> Yes, your source is as plain as day, but is that really _so_ much  
> different than Java, given the  
> ease of disassembling bytecode (and the numerous tools that do a  
> fantastic job of it)?

Rawr by default compiles your app into Java bytecode. We have run a  
decompiler over JRuby’s compiled code for hello world (puts “hello  
world”) and found many lines of unreadable Java. Now go write a non-  
trivial application, and you have code that’s obfuscated pretty well.

> Also bindings for just about every graphics  
> toolkit known to man exist for Ruby, a simple google search will help  
> you with that. One of the more interesting approaches to this though  
> is [http://shoooes.net/](http://shoooes.net/), you should give it a look.

Shoes is an interesting library, but if you’re thinking of writing a  
standard GUI app with lots of UI widgets (such as tables, lists,  
buttons, text fields, etc), then I’d look elsewhere. Shoes tackles a  
different set of UI problems than your standard GUI framework. I’ve  
been paid to port Shoes apps that were trying to do what Monkeybars  
excels at, and it wasn’t pretty to see how Shoes was doing it. Just to  
reiterate - Shoes isn’t bad, it’s just designed for something else.

---

<div class="post-metadata">

**Author:** ![adrianunderwater](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Post date:** [May 25, 2009, 6:02am UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637/6 "2009-05-25T06:02:44Z")

</div>

Logan B. wrote:

> On May 23, 2009, at 12:46 AM, Adrian A. wrote:

> I highly recommend you take a look at Monkeybars - A JRuby library  
> that cleanly handles Swing. You can use a variety of ways to build the  
> UI/layout, all of which Monkeybars is agnostic to. This way you can do  
> some GUI development with Ruby while also capitalizing on your Java/  
> Swing experience.  
> [http://monkeybars.rubyforge.org/](http://monkeybars.rubyforge.org/)  
> Right now we’re moving to Kenai, so everything may not be linked up yet.  
> [http://kenai.com/projects/monkeybars/](http://kenai.com/projects/monkeybars/)  
> Our mailing list is very active and probably the best place to go for  
> help:  
> [http://kenai.com/projects/monkeybars/lists/users/archive](http://kenai.com/projects/monkeybars/lists/users/archive)
> 
> Logan B.  
> removed\_email\_address@domain.invalid  
> [http://www.logustus.com](http://www.logustus.com)

Thanks, I think monkeybars will solve my problem when I will understand  
it. For now there are some problems in the tutorial: the video links  
don’t work. But Logan wrote about that. I hope they will resolve this as  
soon as posible

---

<div class="post-metadata">

**Author:** ![adrianunderwater](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8edcca/32.png) [@adrianunderwater](https://www.ruby-forum.com/u/adrianunderwater)\
**Post date:** [May 25, 2009, 6:27am UTC](https://www.ruby-forum.com/t/deploy-a-ruby-program-gui-connection/168637/7 "2009-05-25T06:27:29Z")

</div>

I found this presentation wich is very good in the subject  
[http://www.riatube.com/2008/12/31/919/](http://www.riatube.com/2008/12/31/919/)
