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.