Learning how to use a language is, essentially, an O(1) operation. The constant factor may be high, but it's just that--a constant. Moreover, it should not take you more than a couple of weeks to learn any language (save obviously impractical ones like Malbolge) well enough to use it for a web project. The policy at my school is that you should be able to pick up a new language well enough to use in a class over the weekend; I agree with this. Picking up a language to use for a web project should not take much longer.
A language that's more productive gives you an O(n) benefit where n is the amount of work you do. Assuming you do a nontrivial amount of work, this is always going to outweigh the amount of time it takes to learn even the most difficult of languages.
Now, in a perfect world, a language would be both easy to learn and productive. Unfortunately, in practice, the most productive languages are also the most difficult to learn. However, this doesn't mean they shouldn't exist--quite the contrary even; I think they are more important than languages easy to learn but less productive.
Assuming you'll be spending any significant amount of time programming, don't pick a language exclusively because it is easy to learn!
> Moreover, it should not take you more than a couple of weeks to learn any language
This is why I find the "you can't find Ruby/Python/whatever developers" argument unconvincing. If you're a good software developer, you can learn new languages. You like learning new languages. It's only the crap developers who typecast themselves in one role throughout their career.
And while I don't believe in all the nonsense about ninja coders and only hiring the best of the best, really, the ability to learn a new imperative language is not a very high bar to clear.
You can, but I think the benefits are vastly overestimated. Languages are tools and the purpose of engineering is building, not having a tool fetish. This doesn't mean one should use bad tools, but when learning new frameworks or languages I almost always feel like I am wasting time.
The innovative ideas in programming language design are few and have been known for many years. Learning Ruby or Python instead of let's say Perl will bring you almost no benefits from a technical perspective.
You're essentially paying with your time to enter the Ruby&Rails ecosystem of jobs, consulting gigs, events and so on but you're still building websites using the same protocols, servers, databases, etc.
The innovative ideas in programming languages design may have been known for many years, but at least half are cleverly not incorporated into mainstream languages like Python or Ruby, and don't get me started on Java.
Language design, more than anything, seems to be a field where using actual academic research is passé. C# seems to be the one rare exception among the popular languages. On other platforms, the innovative ideas are all stuck in less popular languages like Scala, OCaml or Haskell.
A language that's more productive gives you an O(n) benefit where n is the amount of work you do. Assuming you do a nontrivial amount of work, this is always going to outweigh the amount of time it takes to learn even the most difficult of languages.
Now, in a perfect world, a language would be both easy to learn and productive. Unfortunately, in practice, the most productive languages are also the most difficult to learn. However, this doesn't mean they shouldn't exist--quite the contrary even; I think they are more important than languages easy to learn but less productive.
Assuming you'll be spending any significant amount of time programming, don't pick a language exclusively because it is easy to learn!