What can Java do that Ruby can't or when would you use Java instead of Ruby?
As I'm not a Java developer I can't answer too authoritatively on this, but if you're using JRuby (a JVM implementation of Ruby) there are less reasons to use Java if you're used to Ruby than there ever were before. With JRuby you can use Java libraries directly from Ruby. That said, if you're talking "regular" Ruby, you typically wouldn't use it for performance intensive operations or, in my opinion, on "extremely large" enterprise projects where the organization of the project is almost more important than what it actually does ;-)
Thanks for your thoughts .
I was asking because the complexity of Java seems overkill for a lot of my projects . Many of which could probably could be handled by a simpler framework like php or Ruby.
My concern is that there are lot of technologies that do similar things and there is a real 'flavor of the day' aspect to development, especially when you start looking at job postings.
One thing I'd point out is that Ruby as a language has much better support for files and text... meaning XML parsing is much, much nicer in Ruby than in Java. When you get up to the web framework (Rails), there are well established gems that can handle this quite well.
Back to Ruby though, I've found another area which feels a lot more comfortable: Ant tasks. Most of what I ask Ant to do feels a lot more natural in Ruby, mainly because it isn't far from basic Unix commands. Basically, all those shell/perl scripts I've written over the years... I'd love to have them in Ruby instead.