5 Answers
5

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.)

@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.
– greyfadeJul 18 '14 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.

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.

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.