Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I know the Ruby on Rails framework is only for web development and not suitable for desktop application development. But if a ruby programmer wants to develop a desktop application, is it suitable and preferable to do it with Ruby only (not jRuby, as most of the tutorials are for jRuby)? If yes, please provide some good tutorials. I want to use linux as OS for development.

Please suggest something, as I am a ruby developer and wants to develop desktop application.

share|improve this question

4 Answers

up vote 7 down vote accepted

Bowline is a framework for making cross platform desktop applications in Ruby, HTML and JavaScript.

On the other side if it interest you,Here's a tutorial on deploying a rails app as a desktop app

share|improve this answer
thanks for edit.. :) – RAJ ... Aug 29 '12 at 13:31
Thanks for the tutorial link, very informative – briddums Aug 29 '12 at 15:27

Can it be done?

Yes

Should it be done?

Not really. Yes you can use a frozen fish to hammer a nail; that doesn't mean you should.

share|improve this answer
8  
Can you elaborate on why Ruby is not a good language for desktop development? Aside from the fact that Ruby is often confused with Rails, it seems to me that Ruby would be a wonderful language for desktop apps, if good quality GUI libraries existed for it. – Daniel B Aug 29 '12 at 13:41
2  
I like ruby as well, and I didn't say its not a good fit for desktop application. However you have pretty much answered your own question. There are other issues such as deployment etc. I'm sure these can be overcome, but that's the whole point, why should I when I can use a easier solution? – Darknight Aug 29 '12 at 14:10
@DanielB ruby uses GC, so if much data are sucked in, interface will sometimes froze. This is why I hate firefox (didn't find alternative though) – permeakra Aug 29 '12 at 14:43
1  
@permeakra: What does Firefox have to do with Ruby? – Michael Borgwardt Aug 29 '12 at 15:28
1  
elaborate please? – Louis Rhys Aug 30 '12 at 3:16
show 3 more comments

If you're using Mac OS X then you'd likely want to use MacRuby, which allows you to create desktop apps. I think its one of the cleanest ways to develop for the desktop using Ruby. Also, I know its not desktop, but you might want to also take a look at RubyMotion, which is compiler and toolchain allowing you to develop iOS apps (iPhone, iPad, iPod touch) using 100% Ruby.

I've personally used the excellent Ruby game library called Gosu which lets you develop for Windows, Linux and Mac (I tried it on Ubuntu Linux). It sits on OpenGL.

share|improve this answer

I love working in Ruby, and I don't have much opportunity or desire to do web development, so I tried doing exactly this. I grabbed ruby-gnome2 to give me an interface framework and got a good deal of (fairly basic) stuff.

Then I tried it out on a VM under Linux. And sending it to friends. And I learned how horribly difficult it is to distribute Ruby code. For example, the Ruby Windows Installer gives you a lot of basic libraries (such as YAML) for free, which don't come under Linux (and I never did find the right gem install for it). Some libraries work on one OS and not another. A lot of the graphical stuff, especially lower level* stuff, seems to be entirely broken as of 1.9, and isn't getting updated.

So I wouldn't recommend it really.

Ruby is great for scripting purposes, and if you're completely in control of the deployment environment (like a web server) you can do just fine. But distribution is a pain. You might be able to mitigate this though, by using JRuby or IronRuby, which run on the JVM and CLR respectively. They also give you access to graphical toolkits.


*I had a nasty experience trying to get OpenGL to work with Ruby 1.9.3 on Windows. It turned out to be essentially impossible, even after following several rather arcane guides by people who ran into the same problem.

share|improve this answer
Good points. 'Closed' environments like MacRuby or Ruby Motion also avoid this problem by tightly controlling exactly which libraries are available to the runtime. – dodgy_coder Aug 31 '12 at 11:31
@dodgy_code It's just a shame there isn't an equivalent for open platforms that doesn't come with its own distribution problems. – KChaloux Aug 31 '12 at 12:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.