What applications can you make with the programming language Ruby?
Ruby is Turing-complete, which means that everything that can be written in any other Turing-complete language, can also be written in Ruby. Also, no language can be more than Turing-complete, which means that anything that can't be written in Ruby, can also not be written in any other language.
Can you name a few commercial/famous ones written only in Ruby?
One very famous application that is a) famous completely independent from Ruby, and b) famous long before Rails came along, is FreeBSD's portupgrade
command.
Metasploit is a network security toolkit written in Ruby.
LimeChat is an IRC client written in Ruby.
The US Government's National Geophysical Datacenter uses Ruby to run their image processing cluster, processing terabytes of satellite data every day.
NASA uses Ruby for statistics, simulation and also unit testing Fortran programs.
The Monterey Bay Aquarium Research Institute (MBARI) has an autonomous underwater laboratory, called the Environmental Sample Processor (ESP) which can collect water, particle and microorganism samples from the ocean and run several molecular experiments and genome analysis right there, under water, all by itself. It runs Ruby. Now, it's not commercial, and probably doesn't count as famous, either, but hey, it's a friggin' underwater robot!
Note: there are many more. I tried to find the least obvious ones I could think of, since I figured someone else would post Twitter and Basecamp anyway.
What I'd really like to know is can you just learn Ruby instead of C/C++ to make commercial software e.g web server, photoshop, desktop applications, even an operating system etc.
Well, there are multiple web servers written in Ruby; one of them (WEBRick) ships in the Ruby standard library. There are also multiple desktop applications written in Ruby (some listed above).
Adobe Lightroom is written largely in Lua, with only the hardcore image processing done in some lower-level language (I think C, but I suspect there might be a whole lot of MMX/SSE assembly in there, too) but the UI, the batch processing, and application logic are all implemented in Lua. Also, Lightroom is developed in an IDE Adobe specifically wrote for this task, which is written 100% in Lua. There is no reason why the same couldn't be done in Ruby. There is also no reason why there would have to be C or assembly in there, it's just that modern mainstream CPUs are heavily tuned for C and pretty hostile for languages like Ruby or Lua. Also, Adobe is a pretty old company, so they have tons of image manipulation code written in C or assembly just lying around, so why rewrite it?
As for operating systems: like with Photoshop, I don't know that anybody has done it yet, but there is no reason why they shouldn't be able to. Ruby is closely related to Lisp and Smalltalk, and both of these have multiple operating systems written in them.
Now, whether you can actually get a job writing an OS in Ruby, that's a whole other question :-)
However, there is pretty much no execution environment for which no Ruby execution engine is available. For the JVM, there is JRuby, which also runs on Java ME smartphones, Android and Google App Engine. For the CLI, there is (soon) IronRuby, which runs on all the important CLI variants: .NET, Mono and Silverlight. For the Objective-C runtime, there is MacRuby, which is officially sponsored by Apple and is indeed targeted to become a standard way to develop OSX desktop applications. (It's also probably going to run on the iPhone, although the MacRuby developers, being Apple employees, are not allowed to officially acknowledge that fact.) For Unix-like systems, there are MRI, YARV and (soon) Rubinius, which also run on Windows and many other systems, although maybe not quite as fast and stable.