I think there is something to take from the Perl Best Practices when considering the viability of different languages. In this book they stress over and over the need to have maintainable code. Over the years I have had to go back and manage a large number of my applications and have found that the technical cost to any of these has more to do with the documentation and quality of the code above everything else. I have been (trying) to use Ruby and Javascript in addition to my long familiar Perl languages for some projects and have come to some conclusions based on these three.
Perl has a long history. Which translates to a lot of smart people using it and a fantastic amount of both well documented modules and well established modules that work well and readily. So there are four advantages here: documentation that is complete, documentation is accurate, modules are completely functional, testing/execution is easy.
Javascript is a bit of a fluster-cluck in comparison to this. Documentation is mixed. But there are a lot of really great quality modules with some really great sets of documentation out there. And some gross exeptions. But everyone has their black sheep. What javascript doesn't have is the ability to easy execute/test the code from a command line environment. It's got too much dependency on that ugly browser which can make execution and debugging rather difficult. IMHO javascript needs a rewrite to address it's shortcomings but it's still impressive in accomplishments.
Which turns my attention to Ruby. Lovely language, pretty, elegant, nice to work with. If you know what you are doing. There is effectively little to zero documentation on just about everything. Core modules, when you call up the 'ri' or 'rdoc' returns an emply documentation file. Nice job making it impossible to understand what's going on. There is peepcode, but with $9 a whack at documentation it's pretty easy for a project to get very expensive just trying to see what might be the best module. This is nice for one level of capitalism, but bad for the rest. Ruby has done an extremely bad job on documentation. Fortunately, they have done a very good job with test and execution so it's easier than javascript to work with in that regard. You just don't know what you are doing when you start.
If you don't believe me about Ruby try 'ri Rspec'. It returns an empty file letting you know there is nothing done to document the use of this module. I can find hundreds but this is just an example.
If Ruby was able to provide a level of documentation and functional modules that Perl can demonstrate there would not be much to slight Ruby for. This is a major barrier to adopting languages: documentation, testability, execution/debugging