tags:

views:

7650

answers:

17

Whats the best/easiest GUI library out there for Ruby?

I would prefer a cross-platform GUI library, but currently I'm only concerned about Windows (Win32). I am having difficulting finding any that seem to be easy to use. Are there any?

+21  A: 

Ruby Shoes (by why) is intended to be a really simple GUI framework. I don't know how fully featured it is, though.

Some good code samples can be found at the tutorial.

Also, I think shoes powers hackety hack, a compelling programing learning environment for youngsters.

Jacob Carpenter
I second shoes, the shoebox has a ton of great example code to learn from.http://www.the-shoebox.org/ I even contributed one of the simple examples IMShoes it is quick and easy to learn for simple GUI projects.
danmayer
where do you find it now whytheluckstiff is gone?
knoopx
AFAIK http://shoes.heroku.com is the new post-_why home for all things shoes.
Pete Hodgson
+1  A: 

Try shoes http://www.shoooes.net/. Unfortunately, I have not had a chance to work with it yet, but I have an upcoming project were I plan to use it. It is cross platform compatible. Also the API looks like very Rubish so I would give it a try

Josh Moore
_why left the internets with all his works
knoopx
+6  A: 

I started with FXRuby because it had a book.

Joe Zack
And FXRuby is part of the Ruby one-click-installer on Windows!
dwo
+1  A: 

There's a discussion here that might be useful.

From my own (limited) exposure, I'd say that shoes was the most fun and probably the "easiest" to get into. Be warned, however, that figuring out what was wrong when something breaks can be tricky (at least, it was for me).

For a real-world application that I was planning to deploy to real-world users, I think I'd go with wxruby.

Mike Woodhouse
+4  A: 

I recently started using Qt as a GUI framework for a Ruby application. There is a binding called QtRuby. For a quickstart tutorial (covers only windows) see this post

+4  A: 

Limelight I really enjoy the theator metaphor.

pmlarocque
+3  A: 

If you're looking for a cross-platform GUI, then I'd highly recommend going with JRuby and Swing.

Also, take a look at the monkeybars library, which is a Ruby library for building MVC applications using JRuby and Swing, where you can also use the excellent Netbeans IDE to visually build your GUI.

Dema
+2  A: 

There are Ruby bindings for QT and GTK so you can't go wrong with those ones (they're portable too).

The Pragmatic Programmers published a mini book on Ruby with QT and a full book on FXRuby, so I think the latter's another good choice.

Shoes, although easy to learn and cute, is pretty situational and doesn't provide as many options for controls as any of the other ones do, so if you want to build anything beyond a simple UI (not to hate Shoes but it's not mature enough yet), I'd recommend you to use one of the more mature and tested toolkits.

Federico Builes
+3  A: 

Glimmer is an interesting option for JRuby users which provides a very Ruby-ish interface to the SWT toolkit. (SWT is the user interface framework behind Eclipse, which delivers fast performance and familiar UI metaphors by making use of native widgets on the various platforms it supports: Windows, OS X, Linux, etc.) SWT always appealed to me as a Java developer, but coding it was painful in the extreme. Glimmer makes the process a lot more straightforward by emphasizing convention over configuration, and by valuing DRYness and all the other normal Ruby goodness.

Another neat option is SproutCore, a Javascript-based GUI toolkit with Ruby bindings developed by Apple. At least, the demos for it look great, and otherinbox built a pretty slick looking application on top of it. Personally, I've spent quite a few hours trying to get it running on two systems -- one Windows and one Linux -- and haven't succeeded on either one -- I keep running into dependency issues with Merb or other pieces of the SproutCore stack. But it's intriguing enough that I'll go back after a few weeks and try again, hoping that the issues get resolved in that time.

paulbonner
A: 

Tk is available for Ruby. Some nice examples (in Ruby, Perl and Tcl) can be found at http://www.tkdocs.com/

Bryan Oakley
+3  A: 

wxWidgets is worth checking out. It is well supported on Ruby via wxRuby. For an example app, have a look at wxRIDE. See it compared to other toolkits. You might also want to check out Anvil, which is a sort of Rails-ish framework for working with wx. It looks moribund now, though.

Charles Roper
Checking into Anvil, thanks.
jrhicks
+2  A: 

Wxruby is a great framework, simple and clean. Try it or use glade with ruby (the simpliest option)

+1  A: 

I've had some very good experience with Qt, so I would definitely recommend it.

You should be ware of the licensing model though. If you're developing an open source application, you can use the open-source licensed version free of charge. If you're developing a commercial application, you'll have to pay license fees. And you can't develop in the open source one and then switch the license to commercial before you start selling.

P.S. I just had a quick look at shoes. I really like the declarative definitions of the UI elements, so that's definitely worth investigating...

bjnortier
A: 

If you are interested, RubyLearning offers a course on FXRuby and Shoes. Actually, the Shoes course is being conducted currently.

Probably the easiest is Shoes. As an assistant teacher at RubyLearning, I hope that we will have better courses for learners.

Some people got stuck in installing FXRuby. But Shoes has an installer for any platforms (Windows, Mac and Linux).

where's the fxruby course?
rogerdpack
A: 

Using the ironRuby interperter you have the full .net platform, meaning you can code Winforms and WPF(I have only tried Winforms). It is potentially cross platform since the mono platform exist

khebbie
+1  A: 

Here is a good resource for you:

http://en.wikibooks.org/wiki/Ruby_Programming/GUI_Toolkit_Modules

has links comparing basically all of them.

rogerdpack
+2  A: 

If you're developing for Mac, MacRuby has the best library, hands down. Aside from being blazing fast, it has a very nice GUI interface named hotcocoa. Additionally, the library is developed by Apple, uses the Core Foundation classes as its base, and runs on top of the Objective-C runtime using LLVM. In two words, it's blazing fast.

Mike