# What can i do with Ruby?

**URL:** <https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771>\
**Category:** Ruby\
**Created:** [February 16, 2007, 5:25am UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771 "2007-02-16T05:25:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 16, 2007, 5:25am UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/1 "2007-02-16T05:25:48Z")

</div>

I have a visual basic 6 program I made which stores databases and  
allows the user to input data and get calculations from day to day. It  
uses dao. There a many different windows that come up to input various  
preferences and data calculations.

Can I build such a program with Ruby or is Ruby more for dos based  
systems or for only web development?

I guess I just really don’t understand what all Ruby is for.

Thanks in advance to any response.

jazzyOne

---

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 16, 2007, 5:55am UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/2 "2007-02-16T05:55:50Z")

</div>

jazzy wrote:

> I have a visual basic 6 program I made which stores databases and  
> allows the user to input data and get calculations from day to day. It  
> uses dao. There a many different windows that come up to input various  
> preferences and data calculations.
> 
> Can I build such a program with Ruby or is Ruby more for dos based  
> systems or for only web development?

Yes you can build such a system. In the same way that Visual Basic is  
used in many different settings (stand alone programs, VB Script, web  
site back ends, etc.), Ruby can do these same things. There are GUI  
toolkits for Ruby (Tk, Fox / FXRuby, wxRuby, GTK, and Qt to name a few)  
for stand alone development, database drivers to connect with whatever  
database you prefer, frameworks like Rails for web development, and a  
large variety of well tested libraries / gems that can be used to speed  
development on all kinds of projects. In addition, since everything is  
an object in Ruby, you can do some really interesting things that would  
take much more effort in VB.

> I guess I just really don’t understand what all Ruby is for.

Take a look in the archives for this list, and specifically at some of  
the Ruby Q.zes, to see how powerful Ruby can be.

HTH,  
Jim

---

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 16, 2007, 6:15am UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/3 "2007-02-16T06:15:51Z")

</div>

On Feb 15, 11:54 pm, Jim C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> used in many different settings (stand alone programs, VB Script, web  
> site back ends, etc.), Ruby can do these same things. There are GUI  
> toolkits for Ruby (Tk, Fox / FXRuby, wxRuby, GTK, and Qt to name a few)  
> for stand alone development,

So I need to choose and get one of these GUI toolkits? Which would be  
best for this sort of windows type prgrams? Are they free downloads as  
well? thanks a lot! I’ll do a search on those.

---

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 16, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/4 "2007-02-16T13:57:40Z")

</div>

On 2/16/07, Alin P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > well? thanks a lot! I’ll do a search on those.
> 
> Alin

+1 for gtk2

---

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 16, 2007, 7:46am UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/5 "2007-02-16T07:46:47Z")

</div>

jazzy wrote:

> On Feb 15, 11:54 pm, Jim C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > used in many different settings (stand alone programs, VB Script, web  
> > site back ends, etc.), Ruby can do these same things. There are GUI  
> > toolkits for Ruby (Tk, Fox / FXRuby, wxRuby, GTK, and Qt to name a few)  
> > for stand alone development,
> 
> So I need to choose and get one of these GUI toolkits? Which would be  
> best for this sort of windows type prgrams? Are they free downloads as  
> well? thanks a lot! I’ll do a search on those.

Hi Jazzy,

I like very much and seems to be very easy to use, Gtk2.  
It’s free (of course) and it looks very nice on linux.

You’ll need to take a look at ruby-gnome2 project:

> **[The source of https://ruby-gnome.github.io/](https://ruby-gnome.github.io/)**
>
> The source of https://ruby-gnome.github.io/

Best regards,

Alin

---

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 16, 2007, 2:29pm UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/6 "2007-02-16T14:29:44Z")

</div>

+1 for Qt if you’re running Linux/\*BSD. I think that the win32 port  
isn’t finished yet.  
You can get the Ruby binding, QtRuby, in the Korundum’s project  
page[1]. Korundum are the Ruby-KDE bindings.

See ya!

---

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 16, 2007, 8:11pm UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/7 "2007-02-16T20:11:42Z")

</div>

I’ll assume from your post that your are interested in GUI desktop apps  
in Windows, specifically connected to a database file or database  
server.

Generally speaking, Ruby is used in the same places other “scripting”  
languages (perl, python, etc) are used, such as back-end web development  
(Ruby on Rails, Nitro, Camping, etc), command line apps (which are more  
common in unix and OS X, but still exist in Windows [1]), and back-end  
processes (services in Windows, or daemons in unices).

Ruby can be used to write desktop GUI applications too, as previous  
posts have mentioned, however it isn’t, at this point, going to be like  
writing something in VB, Java, or .net; yet.

Specifically on Windows, when writing a desktop GUI app, the most common  
ways are to: write directly to Windows using the Win32 API, use a  
framework such as .net’s WinForms (VB in the old days), or use a cross  
platform framework such as Swing in Java, or QT, gtk, etc.

As is true with all languages, not only Ruby, if you want to create an  
application that just runs on Windows without installing a framework,  
you work directly with the Win32 API, which is very common in c and c++.  
I’m not familiar with it, but there is a Win32api module in Ruby.

As for the .net and java environments, there are projects currently  
being developed to get Ruby to run in those. This would be typically  
the best approach, unless you are currently writing your own message  
loops in c. The projects are JRuby, and [Ruby.net](http://Ruby.net) (there are others as  
well).

You mentioned DAO (wow, that is old), which you are using probably to  
connect to an Access or SQL Server database. In this regard, Ruby is  
great, and has many tools for accessing a database, wether just a file  
or a server. If you’re familiar with DAO, ADO, or [ADO.net](http://ADO.net), you’ll feel  
right at home in Ruby. Start your study by looking into DBI. Other  
interesting areas to research are ActiveRecord, Og, and directly  
connecting to a DB such as the mysql gem.

Happy coding,  
Todd

[1] Windows users who aren’t familiar with the command line often think  
that the Command Line in Windows is DOS. Actually, the command line  
(cmd.exe) is simply a way to work with the operating system, and run  
applications without a graphical user interface. If you run an app in  
the command line, it is still running in Windows, it just doesn’t have a  
GUI. DOS is an entirely different OS (which you can still run inside  
Windows by using [Command.com](http://Command.com), but there is rarely a need to)

---

<div class="post-metadata">

**Author:** ![jazzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@jazzy](https://www.ruby-forum.com/u/jazzy)\
**Post date:** [February 19, 2007, 3:43pm UTC](https://www.ruby-forum.com/t/what-can-i-do-with-ruby/85771/8 "2007-02-19T15:43:55Z")

</div>

On Fri, 16 Feb 2007 06:15:08 +0100, jazzy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> So I need to choose and get one of these GUI toolkits? Which would be  
> best for this sort of windows type prgrams? Are they free downloads as  
> well? thanks a lot! I’ll do a search on those.

If you’re used to VB6,  
[http://www.threeweb.ad.jp/~nyasu/vruby/vrproject-e.html](http://www.threeweb.ad.jp/~nyasu/vruby/vrproject-e.html) should have a  
similar -ish API. I admit to never having extensively used it, and it’s  
a  
little on the unmaintained side, but it’s mostly a wrapper around

GTK, Qt, and FOX aren’t nearly as easy to use for the sort of dirty  
hacks  
(or dirty hacky coding) as VB6. (Whether this is a Good Thing is left as  
a  
flamewar^H^H^H^H^H^H^Hexercise to the readers.) Though Qt, at least in  
the  
PyQt incarnation comes pretty close in certain aspects by having strong  
integration with a standard GUI editor, and some superficial cognates  
(like naming conventions for event handlers. (I might or might not be  
biased about my pet toolkit. Now if only the file opener dialog buttons  
Looked Right on XP.)

David V.
