tags:

views:

101

answers:

3

I want to write a desktop application using Ruby. I want it platform-independent and with rich GUI. How to start? What tools?

+4  A: 

Try with wxRuby

Tutorials

Hello World

require "wx"
 include Wx

 class HelloWorld < App

   def on_init  

     helloframe = Frame.new(nil, -1, "Hello World")

     StaticText.new(helloframe,-1,"Hello World")

     helloframe.show()
   end
 end

 HelloWorld.new.main_loop
S.Mark
Links, code example, awesome!
Jeff O
+1  A: 

I would suggest Shoes.

Shoes.app do
  button "Press me" do
    alert "You pressed me"
  end
end

You could also try FXRuby. PragProg has a book on it.

TK
I wanted to do this for Windows, Mac and Linux, but ran into issues getting shoes working on all three. It has a custom ruby build, which complicates things. I don't know if wxRuby is better.
edebill
A: 

I'd first consider QtRuby. There's a nice tutorial on making it work for Windows here. I think Qt has the edge over wxWidgets in providing nice looking GUI's on OS/X.

Andy Dent