# Question for those developing GUI apps with Ruby

**URL:** <https://rubytalk.org/t/question-for-those-developing-gui-apps-with-ruby/37667>\
**Category:** ruby-talk\
**Created:** [17 May 2007 14:50 UTC](https://rubytalk.org/t/question-for-those-developing-gui-apps-with-ruby/37667 "2007-05-17T14:50:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl\_von\_Laudermann](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Karl\_von\_Laudermann](https://rubytalk.org/u/Karl_von_Laudermann)\
**Post date:** [17 May 2007 14:50 UTC](https://rubytalk.org/t/question-for-those-developing-gui-apps-with-ruby/37667/1 "2007-05-17T14:50:24Z")

</div>

This is a question for those of you who use Ruby to develop GUI-based  
applications, using wxWidgets, or Qt, or GTK, etc. and the appropriate  
Ruby bindings.

My question is, how do you actually package and distribute your  
application to end users, and what do you distribute vs. require the  
user to already install? For example, do you just distribute your .rb  
files, and then tell the user:  
"To run this app, you have to have Ruby installed on your machine,  
PLUS wxWidgets, PLUS wxRuby."?

Or is there a way to package and distribute the wxWidgets (or Qt or  
GTK or Fox) library and the Ruby bindings along with your app's Ruby  
sources so that your only end user system requirement is Ruby? And if  
you do redistribute the GUI library and the Ruby bindings, do you have  
to install them into the System somehow, or modify paths and/or  
environment variables to make sure they're "installed" properly? Or  
can you have everything in a single folder along side your app's  
sources, so everything is nicely self-contained without the user  
needing to modify their system?

So far the only method of creating GUI apps with Ruby that I've played  
around with at all is JRuby, because as I understand it I can make it  
so that the only end user requirement is that they have Java  
installed, by distributing jruby-complete.jar along with my app's .rb  
source files, plus maybe a .bat or shell script file to launch the  
app. And on the Mac you could probably package that all up as a .app  
bundle, so the user can just double click it and go, without having to  
install anything else (since Macs come with Java installed).

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [17 May 2007 15:06 UTC](https://rubytalk.org/t/question-for-those-developing-gui-apps-with-ruby/37667/2 "2007-05-17T15:06:12Z")

</div>

Karl von Laudermann wrote:

> This is a question for those of you who use Ruby to develop GUI-based  
> applications, using wxWidgets, or Qt, or GTK, etc. and the appropriate  
> Ruby bindings.
> 
> My question is, how do you actually package and distribute your  
> application to end users, and what do you distribute vs. require the  
> user to already install?

Have you looked at rubyscript2exe? That way, not even ruby is a requirement.

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

---

<div class="post-metadata">

**Author:** ![David\_Mullet](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@David\_Mullet](https://rubytalk.org/u/David_Mullet)\
**Post date:** [17 May 2007 15:46 UTC](https://rubytalk.org/t/question-for-those-developing-gui-apps-with-ruby/37667/3 "2007-05-17T15:46:08Z")

</div>

Karl von Laudermann wrote:

> Or is there a way to package and distribute the wxWidgets (or Qt or  
> GTK or Fox) library and the Ruby bindings along with your app's Ruby  
> sources so that your only end user system requirement is Ruby? And if  
> you do redistribute the GUI library and the Ruby bindings, do you have  
> to install them into the System somehow, or modify paths and/or  
> environment variables to make sure they're "installed" properly? Or  
> can you have everything in a single folder along side your app's  
> sources, so everything is nicely self-contained without the user  
> needing to modify their system?

I heartily recommend Erik Veenstra's RubyScript2Exe:

[http://www.erikveen.dds.nl/rubyscript2exe/index.html](http://www.erikveen.dds.nl/rubyscript2exe/index.html)

It works well for me, and is well documented and supported. I use it on  
Windows and distribute wxRuby apps for use on dozens of PCs without a  
problem. It works for Mac and Linux, as well. As Joel said, Ruby doesn't  
need to be installed on the user's machine.

David

> **[Ruby on Windows](http://rubyonwindows.blogspot.com)**
>
> On using the Ruby programming language on the Microsoft Windows platform

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Karl\_von\_Laudermann](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Karl\_von\_Laudermann](https://rubytalk.org/u/Karl_von_Laudermann)\
**Post date:** [18 May 2007 13:55 UTC](https://rubytalk.org/t/question-for-those-developing-gui-apps-with-ruby/37667/4 "2007-05-18T13:55:15Z")

</div>

Thanks for the reply. I had looked into RubyScript2Exe in the past. I  
thought it was Windows only, though. Maybe it was back then, or maybe  
I just assumed it was based on the name. I also didn't know you could  
use it to package up wxWidgets and wxRuby with your app.

The one thing that concerns me as I skim the web site is that they  
keep saying "Darwin" when they talk about Mac OS X. Usually this is a  
sign that the software in question runs on the Mac as just another  
flavor of UNIX, from the terminal, rather than as a Mac-like double-  
clickable application icon. Although once you've created your  
executable, there's probably a simple way to wrap it up into a .app  
bundle using Apple's developer tools.

...oops, I just saw this part:

"Don't rely on shared libraries which are not part of the Ruby  
environment. Unless you are absolutely sure your customer has  
installed these libraries. For example: the Ruby bindings for TK are  
considered to be part of your Ruby environment, TK itself isn't. For  
that reason, I like RubyWebDialogs (pure Ruby!) and WxRuby (native  
widgets)."

It appears that wxRuby is a self-contained gem with no external  
dependencies, and not just a binding separate from the wxWidgets  
library. But is this true about the Ruby bindings for Qt and GTK as  
well? If not, then apparently you can't use them with RubyScript2Exe.  
So if I decide to try playing with RubyScript2Exe, that means that I'm  
forced to choose wxWidgets, correct?

So how do Ruby Qt and GTK developers distribute their apps?

Not trying to be a pain, just trying to get a broad understanding.  
Thanks for any insight you can share.

> **···**
>
> On May 17, 11:46 am, David Mullet \<david.mul...@gmail.com\> wrote:
> 
> > Karl von Laudermann wrote:
> > 
> > I heartily recommend Erik Veenstra's RubyScript2Exe:
> > 
> > [http://www.erikveen.dds.nl/rubyscript2exe/index.html](http://www.erikveen.dds.nl/rubyscript2exe/index.html)
> > 
> > It works well for me, and is well documented and supported. I use it on  
> > Windows and distribute wxRuby apps for use on dozens of PCs without a  
> > problem. It works for Mac and Linux, as well. As Joel said, Ruby doesn't  
> > need to be installed on the user's machine.

---

<div class="post-metadata">

**Author:** ![Caleb\_Tennis](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@Caleb\_Tennis](https://rubytalk.org/u/Caleb_Tennis)\
**Post date:** [18 May 2007 14:11 UTC](https://rubytalk.org/t/question-for-those-developing-gui-apps-with-ruby/37667/5 "2007-05-18T14:11:33Z")

</div>

> So how do Ruby Qt and GTK developers distribute their apps?

QtRuby is generally available for most Linux distributions via the package managers,  
and should also be available through the various MacPorts/Fink/etc for OSX. Making  
sure the user has the package installed this way should work most of of the time.
