Take the 2-minute tour ×

What type of programming or project would only involve the Ruby language? Rather than using RoR. What was Ruby used for before the Rails framework existed is what I am basically asking.

share|improve this question

closed as too broad by MichaelT, gnat, GlenH7, Dan Pichelman, jwenting Oct 28 at 10:19


5 Answers 5

up vote 8 down vote accepted

There is nothing that other programing languages can do that Ruby cannot also do. It is, like most other programming languages, a general-purpose language.

Any language that supports calling C API functions can do anything C can do. And, since most operating systems are written in C and ship with C libraries for everything the OS supports, then therefore Ruby can do any of those things. That includes creating and manipulating windows and widgets, connecting to Internet hosts, or anything else.

In theory, one could use Ruby to write an operating system (though it's certainly not well-suited to the task), given the low-level primitive objects that are needed. One could also embed Ruby in any application or service that has C bindings, no matter what language it was written in. You could also write a compiler in Ruby. (I know several people who have done just that.)

share|improve this answer
And, of course you could write a Ruby interpreter in Ruby (without eval of course, that's not fun). +1 –  rightføld Jun 23 '11 at 18:27
@WTP: I believe that's part of the goal of Rubinius - everything except the VM core is written in Ruby. –  greyfade Jun 23 '11 at 18:36
So what was it actually used for? –  AAA Jul 18 at 17:16
@djechlin: Anything. Everything from build systems to web applications. Rails is merely a framework. Asking what it was used for before it got one of several dozen web frameworks implies it has no use without that framework, which is patently ridiculous. It was used for all of the same things that Python, PHP, Perl, and a dozen other languages were used for. –  greyfade Jul 18 at 18:02

I learned Ruby (and then Rails) as a hobby over the last few months. So take this with a grain of salt as it's based on short term hobby learner Ruby knowledge, and not a real-life long term commercial Ruby programmer career or anything...

I get the feeling that pre-Rails Ruby was used mainly as a general purpose language for writing backend scripts and utilities, mostly by the OSS/Linux crowd. The GUI side is a (relatively) weak point, which is why a lot of it was more command line and backend - and you don't see too many popular general usage GUI desktop applications that are written in Ruby.

Essentially, if you wanted a modern, fully OO, and generally nicer language for doing virtually any general purpose thing on Linux (that you might have written in Perl, csh, etc, 10-15 years ago), Ruby was a relatively popular alternative among some of this circle, and a lot of people in that crowd were taking it up.

share|improve this answer

Ruby's aim was partly to take the best qualities of Perl, clean them up, mix in true Object Orientation and a few clever functional features. Consequently it's starting point was really aiming to do the same types of things that Perl is used for, particularly back-end scripting, particularly on Linux systems.

I would say that now one of the things that makes it so useful now is that it is a great tool for developing Domain Specific Languages ( one of the things that is used in Rails and associated projects a lot ) and as these grow in popularity there is a good chance that this will be something we will see more of in future.

share|improve this answer

Ruby is a multi-purpose programming language and can be used for almost anything. (obviously just because it can be used for anything doesn't mean it should be)

From Wikipedia (notice the words 'general-purpose')


share|improve this answer
Desktop Application? Server Side Application? GUI creation? All those? –  opensourcechris Jun 23 '11 at 1:47
@opensourcechris - I believe so. Here's a GUI library for developing desktop apps (including Windows) rubyforge.org/projects/wxruby –  John MacIntyre Jun 23 '11 at 1:51
-1, doesn't answer what it was used for. –  AAA Jul 18 at 17:16

I used Ruby for color calculations for my former employer. I made some small scripts and bit bigger GUI tools to make these calculations.

Ruby was a very easy language for this kind of job. It worked well in Windows and it really was easier to use than the other option, Pascal.

Rails is just so different world compared to simple Ruby scripts, but so is Web. I've used Ruby also with Sinatra which gets you a bit closer to the HTTP layer with requests and responses right in front of you.

share|improve this answer
