There is a general programming language called Ruby, and it's my understanding that Basecamp came first, which is a program written in ruby, and then ROR was created, which is another program written in Ruby.
In any case, Ruby is a general programming language, and php is not, so that may be one reason to choose Ruby. However, you can learn ROR, and not have a clue how to do any Ruby programmning outside of ROR, so you really need to learn some general Ruby programming to be able to do general things with it.
Now all the general programming languages (like ruby, perl, python) have developed many frameworks for making web development more structured, so you can really choose any language you want. How about python? There is the Django web framework, Pylons, and others.
Ruby also has other slimmed down web frameworks, like Capistrano.