GUI With Ruby

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!

···

--
Posted via http://www.ruby-forum.com/.

Hi Yannick,

     Currently, there is no clear winner in the "GUI for Ruby" category. A
few of the possibilites that
I'm aware of are:

     Ruby + Qt
     Ruby + wxWidgets
     JRuby + Java Swing
     Ruby + TK
     Ruby on Rails + a copy of WebRick running locally (to purists, not
really a GUI, but to

pragmatists, may get you there faster than

learning a new toolkit)
Good luck.

Dennis

It depends alot on what you are most familiar with, and where you want your
program to be able to run afterwards. All the ones I've mentioned above
have the advantage of being cross-platform. There are
some other possibilities mentioned in this article:

   http://www.perfectxml.com/syngress/ruby/Page1.asp

Finally, I'd suggest you just Google for "GUI for Ruby" and do some
exploring.

···

On 3/9/07, Yannick Grams <yannick_grams@hotmail.com> wrote:

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!

--
Posted via http://www.ruby-forum.com/\.

--

------------------------------------------------------|
                                                                   >
The way to be happy is to be good. |
                                                                   >
------------------------------------------------------|

You might also want to take a look at FXRuby:

    http://www.fxruby.org/

Hope this helps,

Lyle

···

On 3/9/07, Yannick Grams <yannick_grams@hotmail.com> wrote:

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!

Yannick Grams wrote:

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!

In my humble opinion, QtRuby is by a wide margin the best documented Ruby GUI. In addition to Caleb Tennis' book directly concerning QtRuby, all of the cool Qt gizmos, like Kommander and Korundum, QTDesigner and all of the Qt documentation itself are available.

···

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

Yannick Grams wrote:

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!

http://ruby-gnome2.sourceforge.jp/
Ruby + gtk2

Can utilize glade as a GUI builder if you want. ( http://ruby-gnome2.sourceforge.jp/hiki.cgi?ruby-glade-create-template )
Site has several examples and tutorials and API reference.

No one has mentioned Gtk, which I'm now using with Ruby with great
success. I have not tried it on Windows (or the Mac), but I believe
it works on both. Gtk is widely used in C and very stable. I
have used about every GUI you can think over the years. I loved
FXRuby. I wrote an editor in it for myself until one day I upgraded
my system (via Gentoo) and all programs stopped working. Trying to
fix it proved so much work, I gave up on it!
So far that has not happened with Gtk.

Take a look at Gtk at: http://ruby-gnome2.sourceforge.jp/hiki.cgi?Ruby%2FGTK

Bill

···

On Mar 9, 9:41 pm, Yannick Grams <yannick_gr...@hotmail.com> wrote:

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that
I can use Tk, but that isn't very well documented in the Pickaxe.
Thanks!

--
Posted viahttp://www.ruby-forum.com/

Thanks a lot for the hints! I'll give Tk a bit of a try first up.

···

--
Posted via http://www.ruby-forum.com/.

FXRuby looks very interesting: any chance of there being an FXRuby book?

···

--
Posted via http://www.ruby-forum.com/.

what about X-platform ?

i want to design over MacOS X and be, as much as possible, X-platform :
win* and *nix.

···

M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

In my humble opinion, QtRuby is by a wide margin the best documented
Ruby GUI.

--
Une Bévue

Just curious, what exactly about the upgrade caused everything to
break? Was this as a result of the API changes between FXRuby versions
1.0 and 1.2, or was it something else?

···

On 3/12/07, WoodHacker <ramsayw1@comcast.net> wrote:

I loved FXRuby. I wrote an editor in it for myself until one day I upgraded
my system (via Gentoo) and all programs stopped working. Trying to
fix it proved so much work, I gave up on it!

WoodHacker wrote:

Just a quick question: I'm sick of using Command Prompt for my little
Ruby programs, and I was wondering what can get me started? I know that

No one has mentioned Gtk, which I'm now using with Ruby with great
success. I have not tried it on Windows (or the Mac), but I believe
it works on both.

I have had success with Ruby/Gtk/ruby-gnome2 on a Mac, OS X 10.4 and Windows.

There is a one-click installer for windows:
   Ruby-GNOME 2 - Browse Files at SourceForge.net

On the mac I used darwinports to install everything. There was a small
problem building it (I had to move the existing readline lib out of the way),
but other that that it was pretty simple.

I am able to move applications/scripts between Windows and Mac, and everything works well

Martin

···

On Mar 9, 9:41 pm, Yannick Grams <yannick_gr...@hotmail.com> wrote:

Forgive the double-post, but I was just wondering if there was a Ruby/Tk
book. If not, does anyone know of plans for one?

···

--
Posted via http://www.ruby-forum.com/.

Possibly someday, but not in the immediate future. For the time being,
you'd need to rely on the various online documentation sources at the
FOX home page:

    http://www.fox-toolkit.org/

and the FXRuby home page:

    http://www.fxruby.org/

There's also some coverage of FXRuby in Hal Fulton's book "The Ruby
Way." (This is a good book to own even if you aren't interested in
FXRuby!)

···

On 3/9/07, Yannick Grams <yannick_grams@hotmail.com> wrote:

FXRuby looks very interesting: any chance of there being an FXRuby book?

There's a qtRuby book available (PDF, for US$8.50)
http://www.pragmaticprogrammer.com/titles/ctrubyqt/

Is anyone able to give a quick rundown on which of these toolkits will work on both Windows and OS X?
It's not that clear from a number of the sites which platforms they will work on. Some (like qt) seem Linux only. I don't use Linux <ducks> but a mix os Win and OS X.

Cheers,
Dave

···

On 10/03/2007, at 1:22 PM, Yannick Grams wrote:

FXRuby looks very interesting: any chance of there being an FXRuby book?

I haven't tried it myself, but wxWindows bills itself as being useable on
Win, Mac, and *nix. I believe that
there is a library / framework for Ruby + wxWindows call wxRuby (
http://wxruby.rubyforge.org), but I don't
know how well documented it is. The wxWindows home page is:
http://www.wxwindows.org/
There's a very good wxWindows book available (Cross Platform GUI Programming
with wxWidgets), and it has an open source license which also allows it to
be used in proprietary software projects (
Licence - wxWidgets)

Caveat: It seems to have alot going for it, but I haven't used it
personally, so do your own investigation, and YMMV.

Dennis

···

On 3/10/07, Une Bévue <unbewusst.sein@google.com.invalid> wrote:

M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

> In my humble opinion, QtRuby is by a wide margin the best documented
> Ruby GUI.

what about X-platform ?

i want to design over MacOS X and be, as much as possible, X-platform :
win* and *nix.
--
Une Bévue

--

------------------------------------------------------|
                                                                   >
The way to be happy is to be good. |
                                                                   >
------------------------------------------------------|

I have had success with Ruby/Gtk/ruby-gnome2 on a Mac, OS X 10.4 and Windows.

It seems we'll get the GTK2 & Cairo "Quartz" variant in a near future,
following recent post on MacPorts-User...

There is a one-click installer for windows:
   Ruby-GNOME 2 - Browse Files at SourceForge.net

On the mac I used darwinports to install everything. There was a small
problem building it (I had to move the existing readline lib out of the way),
but other that that it was pretty simple.

I am able to move applications/scripts between Windows and Mac, and everything
works well

That's really fine having an X-platform like GUI.

Do you have to change something within your Ruby scripts ?

···

Martin Portman <martin.portman@iptest.com> wrote:

Sharon Phillips wrote:

FXRuby looks very interesting: any chance of there being an FXRuby book?

There's a qtRuby book available (PDF, for US$8.50)
http://www.pragmaticprogrammer.com/titles/ctrubyqt/

Is anyone able to give a quick rundown on which of these toolkits will work on both Windows and OS X?
It's not that clear from a number of the sites which platforms they will work on. Some (like qt) seem Linux only. I don't use Linux <ducks> but a mix os Win and OS X.

Cheers,
Dave

Qt 4 Ruby works on Windows and Linux for sure. I don't know about Macs, though. I think most Mac users prefer native Mac GUIs anyhow, and there is one for Ruby that has a very good reputation. I don't have a Mac, so I've forgotten the name.

···

On 10/03/2007, at 1:22 PM, Yannick Grams wrote:

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

You might consider the Dashboard Widgets or Windows Gadgets as a medium for a Ruby GUI as well, also incorporating Javascript. There are application stub libraries for OS X, and likely the same for Windows and Linux. All it means is embedding Ruby into another language which handles the GUI and Ruby handles the core logic. Possible, happens often with Python or Perl. But no matter which approach you take, there is a whole library to learn. Using a web browser and a web page as the front end locally could be a much faster approach in terms of prototyping. Ruby should be able to make any system calls you might make in another language. As for cross-platform, success depends on how native the app looks and feels. Fact is with a GUI, each platform is different enough that it isn't practical to write once and run everywhere, it ends up being like Java, write once and debug everywhere.

Actually, Qt has gotten a lot better, and does work on Windows and OS X and linux with claimed native look and feel.
Your mileage may vary and licensing is not free.

···

On Mar 10, 2007, at 12:37 PM, Sharon Phillips wrote:

On 10/03/2007, at 1:22 PM, Yannick Grams wrote:

FXRuby looks very interesting: any chance of there being an FXRuby book?

There's a qtRuby book available (PDF, for US$8.50)
http://www.pragmaticprogrammer.com/titles/ctrubyqt/

Is anyone able to give a quick rundown on which of these toolkits will work on both Windows and OS X?
It's not that clear from a number of the sites which platforms they will work on. Some (like qt) seem Linux only. I don't use Linux <ducks> but a mix os Win and OS X.

Cheers,
Dave

FOX works on both Windows and OS X, but the OS X version runs under
the X server (i.e. it doesn't use Carbon APIs directly).

···

On 3/9/07, Sharon Phillips <phillipsds@yahoo.co.uk> wrote:

Is anyone able to give a quick rundown on which of these toolkits
will work on both Windows and OS X?