Building desktop application using Ruby and any GUI Framework

I want to write a small desktop application on Ruby. I want the
application to be platform independent. I am using Fedora Linux for
building app. but I want the application to run on Windows as well.

I want to make use of any easy to use GUI tool. QT designer is already
installed on my Linux. Which other GUI frameworks are easy to use for a
Ruby beginner to use? It should have a wide user base so that help is
easily available.

Hi Rohit (I’m Rohit too!)

I wrote some ruby-gtk2 code a while back and it was not at all a bad
experience:
http://ruby-gnome2.sourceforge.jp/

I wouldn’t call it widely used outside of Linux, but my code was
portable
to both Windows and OSX. Users of Windows, simply have to install Ruby
and
then install GTK2 libraries.

There should be pretty good docs on the website, but I can give you some
working samples I wrote that deal with gnome notificatiers.

Rohit

On Sun, Jan 22, 2012 at 8:08 AM, Rubyist R. <

@Rohit M.:

Hi,

What type of application you built using GTK? Are you using any
database-backend as well?

You should give green_shoes[1] a try.

It’s an ever so pleasant DSL built on top of Ruby GTK2, here’s a
sample from the readme:

require 'green_shoes'

Shoes.app( :width => 250, :height => 250 ) do
  para 'Hello, world!'
  image 'images/shoes.png'
end

All you need to get started is ruby 1.9.2, rubygems 1.5+, and the gtk2
gem (which may be automatically installed for you when installing the
green_shoes gem): then you’re ready to install green_shoes:

gem install green_shoes

The best part, other than the super friendly api, is that your apps
will run on linux and windows without any modification. They may even
work on OSX, but I’m not sure the current state of support for mac.

zzak

1: https://github.com/ashbb/green_shoes

On Mon, Jan 23, 2012 at 5:05 PM, Zachary S.
[email protected]wrote:

image ‘images/shoes.png’
will run on linux and windows without any modification. They may even
work on OSX, but I’m not sure the current state of support for mac.

Just tried on Ubuntu 10.04 (in rvm with 1.9.3) and it installed
like a charm :slight_smile: The test program also worked immediately.

$ cat Gemfile
source :rubygems

gem ‘green_shoes’

$ bundle install
Fetching source index for http://rubygems.org/
Installing pkg-config (1.1.2)
Installing glib2 (1.1.2) with native extensions
Installing atk (1.1.2) with native extensions
Installing cairo (1.10.2) with native extensions
Installing gdk_pixbuf2 (1.1.2) with native extensions
Installing pango (1.1.2) with native extensions
Installing gtk2 (1.1.2) with native extensions # this took a minute or
so
Installing green_shoes (1.1.354)
Using bundler (1.0.21)

HTH,

Peter

To warm up your research…

http://stackoverflow.com/questions/260905/whats-the-best-easiest-gui-library-for-ruby

Tip: Some of them are better than the others when dealing with an
specific constraint/objective. In a small project of mine I wrote 3
(simple) GUIs (looking the same) using tk, wxRuby, RubyCocoa.

Abinoam Jr.

On Sun, Jan 22, 2012 at 2:33 PM, Rubyist R.

Rubyist R. wrote in post #1042024:

I want to write a small desktop application on Ruby. I want the
application to be platform independent. I am using Fedora Linux for
building app. but I want the application to run on Windows as well.

Ruiby :
https://github.com/raubarede/Ruiby
http://regisaubarede.posterous.com/

It should have a wide user base so that help is easily available.

yes, one user: me :)]

Oh, I should clarify, you can use any ruby that is >= 1.9.2, I’m not
sure about 1.9.1 but 1.9.2 and 1.9.3 both work exceptionally well.

There’s also a great many number of samples available in the github
repo: https://github.com/ashbb/green_shoes/tree/master/samples

zzak

On Mon, Jan 23, 2012 at 11:22 AM, Peter V.

Ruby-gtk runs on Windows too.

Wide user base can be a problem, there are not that many ruby users, and
only 1% of them use something like ruby-gtk.

But you will be able to ask for help on the mailing list.

hello,
the simpler for Windows is to use the RubyInstaller
(http://rubyinstaller.org/).
it now include TK, so it’s really the
easiest way to go, for Windows.

good informations about it here : http://www.tkdocs.com/index.html

Oh, I should clarify, you can use any ruby that is >= 1.9.2, I’m not
sure about 1.9.1 but 1.9.2 and 1.9.3 both work exceptionally well.

There’s also a great many number of samples available in the github
repo: https://github.com/ashbb/green_shoes/tree/master/samples

Green shoes looks nice. I wish there were a (java/jruby) equivalent to
shoes/green shoes…

Green shoes looks nice. I wish there were a (java/jruby) equivalent to
shoes/green shoes…

https://github.com/shoes/brown_shoes

Have you tried the Glimmer Desktop Development Library for Ruby? Not only does it offer cross-platform support and native-UI, but it also provides a programmer-friendly declarative DSL, data-binding support, scaffolding, and packaging (e.g. make a Mac DMG app file). It was originally presented at RubyConf 2008.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs