views:

434

answers:

7

I'm sorry if this question is noob-ish but I'm not having much luck with Google. Can Ruby be used for UI based Windows apps? I'm not looking for a Rails app, just Ruby.

Thanks

+1  A: 

You could check out wxRuby..

JasonWyatt
+1  A: 

You bet. wxRuby is what I use, but others use GTK. wxRuby also works on Linux which is where I am writing a program, but it should suit your needs. You can install it using

gem install wxruby
MI3Guy
+9  A: 

You have couple of options.

Hemant Kumar
Thanks for the info Hemant.
JimDel
Swing can be used from MRI ruby with this converter: http://github.com/neelance/java2ruby
johannes
+3  A: 

Yes, but the experience will vary depending on how you hook up the UI. TK or gtk, wxRuby, ruby shoes (not sure how alive that one is right now), Qt (which is cool) and fox (aka fxRuby) are some of the options. If you like to hurt yourself, you can hook directly to Win32 libraries, but I doubt you'll want to.

Additionally, if you target the nascent IronRuby, you can use WinForms or WPF.

JasonTrue
Haven't try IronRuby yet, how good is the WinForms or WPF support? I heard it will become 1.0 soon right?
DJ
I don't know that IronRuby goes out of its way to support WinForms or WPF, but the simple fact that you can instantiate any DotNet object should give you most of what you need. ScottGu does have a simple example of using WPF, as well: http://weblogs.asp.net/scottgu/archive/2007/07/23/first-look-at-ironruby.aspx
JasonTrue
Also there is some information on WPF in IronRuby here: http://ironruby.net/Documentation/.NET/WPF
JasonTrue
Oh come on the Win32 libraries aren't any more painful than a root canal performed with a shovel.
Jason D
+1  A: 

Depends what kind of Window app are you going to implement. If this is your own pet project, then definitely you can try WxRuby or GTK. There is no risk here.

However if this is going to be serious, commercial windows app then you have to think twice. It is really worth using Ruby? It is great language. I use it on daily basis. But for a Windows app, C# integration with the whole environment is hard to beat.

Greg Dan
+2  A: 

I also prefer wxRuby. It looks great, uses native components, yet is cross-platform. On the Ruby On Windows blog there is a great write-up of how to get started. It helped me a lot.

nathanvda
+1  A: 

check out Shoooes!