I wanted to know, while deciding which language or technology to use for implementing an idea; a design, what are the factors involved in making a decision? Specifically talking about popular scripting languages, why would one choose to use ruby over python or perl or vice-versa? All these scripting languages have proved their worth, so how does one decide?
Besides any hype that one language receives and the other doesn't, I think two factors play a role: mastership of the language, and availability of libraries. If you know Ruby already, you are more likely to use it again, and also to recommend it when asked; likewise for Python. Wrt. libraries: if you want to use Ruby-on-Rails (which you may have chosen for some reason), you have to use Ruby; likewise, if you want to use Django, you have to use Python. Etc.
It's going to depend a lot on what you want to do (the stock answer).
There aren't huge differences between Ruby and Python - both are object oriented languages with more similarities than differences, really. I'd suggest you try each of them out for a moderate sized programming project - say something that might take 2 or 3 hours. You'll notice some things about each of them that will perhaps rub you the wrong way (indentation as syntax puts some people off when it comes to Python, for example.) A lot of the choice is going to come down to your personal tastes.
If this is a standalone project you're thinking of implementing then it probably doesn't matter which of the two languages you choose. If you need to interact with some existing infrastructure then it may matter a great deal - for example, if you need to work with some Rails related infrastructure then you'll probably want to go with Ruby, if it's Django, then you'll want Python.
I would look at these factors when making a decision -
Your Comfort Level and your teams
Your Ability and your teams
Your Resources
Requirements
Platform Maturity
Support
I just came across this comparison, b/w Ruby and Python, which is in terms of performance and memory management.
A fair comparison can be found here. Further, I tend to agree with all the three answers above.