Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Beside RoR, what do people use Ruby for? Is there any use for Ruby on Windows platform? If you use ruby for scripting why not use Bash or Powershell?

share|improve this question

closed as too broad by gnat, Kilian Foth, BЈовић, Bart van Ingen Schenau, Jimmy Hoffa Aug 2 '13 at 14:26

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Guys at OpsCode wrote Chef in Ruby. The result is a major player in the deployment / orchestration software field. It is not RoR at all. –  9000 Jun 27 '13 at 23:08
Ummmm... everything? –  Dynamic Jul 3 '13 at 21:54
I've seen it used for anything from general shell scripting, to test automation, web apps, to complete desktop applications. Its a mature language at this point and can to just about anything. –  Rig Jul 15 '13 at 15:30
There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs. –  gnat Aug 1 '13 at 16:37

4 Answers 4

Ruby is a Turing Complete language. You can use it to do anything, subject to hardware constraints, language performance and your own programming skills.

People choose one Turing-complete language over another for many different pragmatic and esthetic reasons. Bash and Powershell are particularly well-suited for one-off or "batch" jobs, whereas Ruby is more of a general-purpose programming language.

Ruby on Rails is what popularized Ruby as a mainstream programming language; it's the killer app of Ruby. That's what some of these other off-Broadway languages like Nemerle need to evangelize themselves; a killer app that's not readily available anywhere else, and for which the language is particularly well-suited.

Were it not for Rails, Ruby wouldn't be nearly as popular as it is; just as without jQuery, javascript would still be perceived as just the little browser scripting language.

share|improve this answer
Is RoR limited to web development? –  JeffO Jun 27 '13 at 23:04
@JeffO Ruby on Rails is a web development platform. So while there might be some way to program the next version of Angry Birds on a tablet using it, that might not be the best way to go about it. –  Robert Harvey Jun 27 '13 at 23:11
I don't know about "Were it not for Rails, nobody would know anything about Ruby" - I'm pretty sure there was a bunch of talk about Ruby in The Pragmatic Programmer well before Rails came along. It was already rumbling along pretty well among those in the know. –  glenatron Jul 5 '13 at 11:12
@glenatron: I modified the wording in my answer somewhat, to accomodate the "Pragmatic Programmer" crowd. –  Robert Harvey Aug 1 '13 at 16:33

As Robert Harvey pointed out, Rails is the "killer app" for Ruby the way jQuery is the "killer app" for javascript. By no means are Ruby and javascript useless (or even uninteresting) languages outside of the scope of those libraries. Ruby is no more a web programming language than Python or C#.

Ruby draws a lot of inspiration from languages like Smalltalk, Lisp and Perl. It's a good language to learn concepts in, like metaprogramming, object oriented programming, functional programming (via closures/blocks), or regular expressions (which are provided as a language-level first-class construct).

Like Python, it's well suited to prototyping and writing glue code, due to its flexibility. People have had success using Ruby as an embedded scripting language. For example, the "RPG Maker" series provided a Ruby API through which users could manipulate or rewrite the behavior of their game engine almost entirely. The JRuby implementation of Ruby provides good interop with the JVM, making it easier for users to embed Ruby into Java programs or use Java libraries.

Generally, anywhere you see Python or Perl being used, Ruby is a fair alternative (with perhaps the exception of numerical or statistical manipulation, which Python has more mature libraries for).

I've found Ruby to be a very well designed language that's worth learning outside of (or despite) Rails (which is a framework I've never had cause to use myself, as I hardly do any web programming).

share|improve this answer
Downvote on both my answer and Robert Harvey's? Were they both inadequate? –  KChaloux Jul 3 '13 at 17:50

The question being "What do people use Ruby for besides RoR?" I would have to give a partial list. Chef and Puppet uses Ruby and are for system administration, Google Sketchup has Ruby as it's scripting language of choice for modelling, Adhearsion is used with Ruby for VOIP with Asterisk.

So far, none of these are Web-centric. Network, perhaps, but not web.

That is only a small sampling of what people use Ruby for.

It is a Turing complete language, as mentioned in other answers, so there is no reason it can't be used for whatever you can imagine it being used for.

share|improve this answer
That error lasted a long time, without me noticing it. Thanks @FrustratedWithFormsDesig. –  vgoff Jul 15 '13 at 15:43

Ruby isn't limited to web applications only although it is mainly used for that.

Two other cases that are worth mentioning:

  • Ruby is suitable to write "Domain Specific Languages" also.
  • Now, you can write Mac and iOS in Ruby language via Ruby Motion.
    This case could be debate-able since it is not based on MRI but that is also the case of Java in Android development.
share|improve this answer

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