# Can we develop desktop application

**URL:** <https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876>\
**Category:** Ruby\
**Created:** [July 10, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876 "2009-07-10T14:53:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [July 10, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876/1 "2009-07-10T14:53:33Z")

</div>

Is ruby for developing web based applications only

or can we develop desktop applications with ruby.  
If we do how can we do that.

Regards,

Rajkumar.Surabhi

---

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [July 10, 2009, 3:00pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876/2 "2009-07-10T15:00:35Z")

</div>

> or can we develop desktop applications with ruby.  
> If we do how can we do that.

Not sure if “we” can do it 😉

But it is possible.

There are bindings for ruby-qt ruby-gtk/gnome ruby-wxwidgets ruby-fox  
ruby-tk and so on and so forth.

IMHO the best documentation is here: [http://ruby-gnome2.sourceforge.jp/](http://ruby-gnome2.sourceforge.jp/)

---

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [July 10, 2009, 3:04pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876/3 "2009-07-10T15:04:58Z")

</div>

On Fri, Jul 10, 2009 at 6:23 PM, Rajkumar  
Surabhi[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is ruby for developing web based applications only
> 
> or can we develop desktop applications with ruby.  
> If we do how can we do that.

There are several excellent gui toolkit bindings for ruby, including  
all the major ones (Qt, Gtk, Wx, Fox, Tk). Also Monkeybars is a  
higher-level toolkit on top of Swing, for JRuby. And Shoes is a  
complete GUI-development toolkit that includes a forked version of  
ruby.

martin

---

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [July 10, 2009, 6:16pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876/4 "2009-07-10T18:16:06Z")

</div>

Rajkumar S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is ruby for developing web based applications only
> 
> or can we develop desktop applications with ruby.  
> If we do how can we do that.

Depends what you mean by desktop. Ruby is a scripting language. You can  
run a Ruby script on your local machine. To me, that’s a desktop  
application! It is true that Ruby became famous through Ruby on Rails,  
which makes web applications, but that’s just a kind of accident.

If you mean a GUI application (something double-clickable with an  
interface), then how you incorporate Ruby depends on what platform  
you’re using. There are various cross-platform solutions, which others  
have already mentioned. If you are aiming at just one platform, there  
may be other solutions for that platform. For example, on Mac OS X,  
you’d want to look at MacRuby. m.

---

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [July 10, 2009, 3:29pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876/5 "2009-07-10T15:29:30Z")

</div>

> or can we develop desktop applications with ruby.  
> If we do how can we do that.

I’d recommend shoes or wxruby.  
=r

---

<div class="post-metadata">

**Author:** ![mailtorajuit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Post date:** [July 10, 2009, 11:19pm UTC](https://www.ruby-forum.com/t/can-we-develop-desktop-application/171876/6 "2009-07-10T23:19:58Z")

</div>

On Friday 10 July 2009 07:53:39 am Rajkumar S. wrote:

> Is ruby for developing web based applications only
> 
> or can we develop desktop applications with ruby.

This question seems to be asked fairly often…

## Ruby is a general-purpose programming language. Like most such languages, there is no reason you couldn’t use it to write any kind of application

about the only hard technical constraint you have is the speed of the  
implementation.

To put it another way: JavaScript can be used to develop desktop  
applications.  
You could use Google Gears, or you could use KDE4’s scripting system, or  
you  
could extend something like spidermonkey.

> If we do how can we do that.

This is a much better question, though still one that could probably be  
Google’d first.

It depends very much what you mean by “desktop applications”. There are  
many  
approaches, and a few of the replies helped with that – but the same is  
true  
for any other language. If you were using C/C++, you could use MFC, the  
Win32  
API, GTK, wxwindows, Qt, raw X11, or anything in between. There are  
probably  
Ruby bindings for a few of those, and some nice higher-level libraries.

And, technically, even a web application (yes, even Rails!) could be  
considered a “desktop application”. Just use sqlite for the database,  
bind it  
to localhost, and have it open itself on boot with Launchy.  
Unprofessional?  
Maybe, but I’ve seen nvidia do it for their firewall software – though  
they  
used Apache, and probably not Ruby.
