I'm looking to get out of my current field, which is a lot of the hard part. Doing low-level OS and framework programming for painful non-garbage-collected C and C++ embedded stuff is only going to last so long... Five years from now, it's going to be clear it's a dinosaur technology for die-hards who won't quit. Sort of a shame, 'cause I'm good at it :-)
I'm looking at web programming as the next place to go because it's broadly necessary and provides a lot of value to a lot of people -- I see it as having more time before it evaporates. I'm sure ten years out I'll be doing something different, and I'm not planning more than ten years out. By then we'll all be cyborgs in hovercars anyway :-)
I'm interested in newer programming languages (Ruby/Rails, Python, etc) because fundamentally, I see C/C++ going the way of the dodo. There are still going to be jobs there (hey, COBOL's not dead yet), but staying in C-land is going to be more of a squeeze year by year, and C++ has already fallen behind C for userbase, and continues to get smaller. My taste has been vindicated, 15+ years later ;-)
I like Rails as a framework, and I think a lot of the tricks Ruby and Rails do are quite elegant. That is, I like them as tools. I'd accept most jobs in Rails because, y'know, good tools help a lot if the job doesn't suck too much. I speak as somebody who put something like 7 years of spare time into a MUD library simply because the tool it was built on, DGD, was fabulously capable and good to work with, even though it had no community or prospects to speak of.
The problems with the tools you mention: C++ is going to keep dying. PHP is never going to be much fun to use. Java is more credible, but it's been COBOL-like since the early days -- many, many companies use it, and nobody outside of Sun is really passionate about it. New, exciting stuff is rarely or never done in Java first, though it gets there eventually. Or to put all of that another way: it's really not my thing. It doesn't turn my crank.
I'm mentioning two separate, contradictory goals here: stable, long-term work possibilities and tools that don't suck. I'm aware that these things pull in different directions. Rails and its relatives seem to actually be in the sweet spot where there's a fair bit of each of those things, and I'm willing to bet on that working out. I've worked extensively with those tools and, no shit, they're really useful and valuable. It seems like a decent bet. And I'd really like to work with tools that don't suck. C is nice, but it was a cranky old geezer of a language when I learned it -- we just didn't have this crop of promising upstart languages to make it look bad.
I'd potentially be willing to consider work with other tools. Rails isn't the only cool thing out there, and Python was a good language, to name another reasonable contender. Hell, for the right task, even Perl is pretty good. But fundamentally, most tools suck. If I'm going to go to all the trouble of changing fields and spending years doing it, I'm going to move to tools that suck a lot less than what I'm using now.
Rails is that.
And if I'm going to change fields, I'm going to do so to get to one with some durability in it. Web programming is good that way -- the web is really not going away, and it's a big field, and a lot of these tools will last more or less forever in one form or another.