I know that this is a difficult question to answer, but I thought I would try anwyays....
I am just starting at a new company where they have a minimal existing code base.  It probably has a month of man effort invested at this point. It is currently written in Ruby.  
It is also currently using Ruby on Rails -- but mostly just for the sake of testing out the Ruby code. 
The ultimate goal of the code is actually to drive a backend to a site that will be written in php (could be a backend to Drupal, Echo, etc...).  
I have no experience with Ruby, so I would tend to want to go with a language I know better (like Python), but am not willing to rule Ruby out for no reason.
If you are not going to use Ruby for a Rails project, is it still worth it?  Will I be better off going with Python or some other language?
How do the libraries stack up?
Thanks!!!
Ruby Madness. Sure, it seems cool, but it might lead to the hard stuff: Lisp

My predictions:

It's pretty clear that you are OK with either Ruby or Python, and obviously php can be made to work. 
You will really like Ruby.

I'm a little bit worried that after Ruby the only place left to go will be Lisp, and that I will become one of those raving lisp maniacs with bad haircuts waving my arms and muttering about The One True Macro Processor.
Slightly more seriously, though Lisp and Smalltalk are still in tiny niche spaces after 60 and 40 years,  it turns out that the child of the two bore fruit. Various Lisp and Smalltalk hackers are starting to show up speaking about their child Ruby at Ruby and Rails cons.  As it happens, Ruby (timeframe 15 years) has quite a bit of the Lisp and Smalltalk magic.
And, to this party, Ruby brings about every single bit of the day-to-day and 3-line-script usefulness of Perl. Ruby is an explosion on the language scene that combines the scripting superpower of Perl with the object-orient superpower of an exotic language like Smalltalk.
Ruby is an awesome and groundbreaking language with or without Rails. I say, drink the kool-aid.
To Ruby or not to Ruby