What's the best/easiest GUI Library for Ruby?

RubyUser Interface

Ruby Problem Overview


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?

Ruby Solutions


Solution 1 - Ruby

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 in the tutorials.

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

Solution 2 - Ruby

Here is a good resource for you:

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

has links comparing basically all of them.

Solution 3 - Ruby

I started with FXRuby because it had a book.

Solution 4 - Ruby

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

Solution 5 - Ruby

Limelight I really enjoy the theatre metaphor.

Solution 6 - Ruby

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.

Solution 7 - Ruby

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.

Solution 8 - Ruby

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.

Solution 9 - Ruby

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.

Solution 10 - Ruby

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.

Solution 11 - Ruby

Try visualruby you can easily build your forms using the glade interface designer, then write pure ruby code to animate them. Its much easier than the options mentioned above because you don't have to hand-code everything.

You can see example videos on the visualruby website.

Solution 12 - Ruby

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...

Solution 13 - Ruby

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).

Solution 14 - Ruby

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

Solution 15 - Ruby

Try shoes. Unfortunately, I have not had a chance to work with it yet, but I have an upcoming project where I plan to use it. It is cross-platform. Also the API looks very Rubyish so I would give it a try.

Solution 16 - Ruby

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.

Solution 17 - Ruby

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

Solution 18 - Ruby

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

Solution 19 - Ruby

Use the browser as GUI using Watir like in this question and answer:

https://stackoverflow.com/questions/11724201/use-browser-as-gui-in-ruby

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionChris PietschmannView Question on Stackoverflow
Solution 1 - RubyJacob CarpenterView Answer on Stackoverflow
Solution 2 - RubyrogerdpackView Answer on Stackoverflow
Solution 3 - RubyJoe ZackView Answer on Stackoverflow
Solution 4 - RubyTomView Answer on Stackoverflow
Solution 5 - RubypmlarocqueView Answer on Stackoverflow
Solution 6 - RubypaulbonnerView Answer on Stackoverflow
Solution 7 - RubyCharles RoperView Answer on Stackoverflow
Solution 8 - RubyDemaView Answer on Stackoverflow
Solution 9 - RubyMikeView Answer on Stackoverflow
Solution 10 - RubyFederico BuilesView Answer on Stackoverflow
Solution 11 - Rubyuser1182000View Answer on Stackoverflow
Solution 12 - RubybjnortierView Answer on Stackoverflow
Solution 13 - RubyTakaaki KatoView Answer on Stackoverflow
Solution 14 - RubykhebbieView Answer on Stackoverflow
Solution 15 - RubyJosh MooreView Answer on Stackoverflow
Solution 16 - RubyMike WoodhouseView Answer on Stackoverflow
Solution 17 - RubyBryan OakleyView Answer on Stackoverflow
Solution 18 - RubyjoxerView Answer on Stackoverflow
Solution 19 - RubypeterView Answer on Stackoverflow