I'm learning Ruby via RoR, for developing a web application. But what if
I want to do a "normal" application using Ruby, how do I do that? What
tools are there for building a GUI and connect that to Ruby?
By a 'normal' application, I take it that you mean some kind of PC
runnable application that the user manually launches, and has some
kind of windows interface?
To get windowed apps in Ruby you need to use a windowing toolkit.
By default you use Tk, and Ruby has built in libraries to work with it.
Tk isn't exactly the prettiest option, and you will quickly start seeking
out others that:
- Have some kind of visual form designer
- Look aesthetically pleasing when you put the effort in
- Look native on the different OSes
- Are easy to use from Ruby
- Are not a b*tch to get set up an working
The following are the windowing toolkits that are frequently discussed
here (not an exhaustive list of options):
- Gtk/Gtk+
- Qt
- FxWidgets
I don't know anything about the form designers for any of these, but
Qt is the prettiest by reputation, though it has byzantine installation/
legal issues for windows use. Gtk/Gtk+ is pretty stable and ubiquitous,
but its not pretty, and I have found it murder to install on windows for
some Ruby apps that require it. FxWidgets gets a lot of attention
for multi-platform development, I have never had issues getting it
installed on Windows, and it looks respectable (if very Win2K-like)
though I believe there are recent clashes between it and the latest
Ruby 1-click builds.
My experience with Ruby UI development is exclusively on windows
and very minimal, but installing windowing toolkits on windows in
the first place is a very unusual activity, and not very customer-acceptabl=
e.
I don't know if there are any Ruby specific libraries that let you use
native window toolkits like on Windows or Mac OS X.