The Disadvantages of Java: * It's wordy. List<Integer> l = new ArrayList<Integer>(); * Static typing is constraining. * The data representation is clumsy. Can't say: [1,2,3] * Minimal meta-programming, limited to reflection.
The Advantages of Ruby: * Terse and elegant. You can say a lot in a few words. * Very flexible. * Simple to learn (not counting Rails). * Very convenient data representations. * Powerful meta-programming capability. * REPL! * You can write really lovely DSLs. * Rails can get you going on a web app in a jiffy. It's very slick. * Development speed can be _much_ faster than Java, at least at first. Carelessness is the great equalizer!
Disadvantages of Ruby. * Slow. Damned slow. Really damned slow. * Did I say it was slow? It is. Really. * It's really slow. * Jruby is faster, but still really slow. * There aren't as many programmers. * Rails has a steep learning curve once you get past the basics. * People use meta-programming too much. This is a people problem, not a language problem; but it's real. * The tooling is nowhere near as good as for Java. Refactoring tools are pretty weak. * It's really easy to make a mess if your are careless.
The speed of Ruby is not really a huge concern in most cases since processors are cheap. But the language is really, awfully, slow.
If I were starting a new website project, and had to choose bewteen Ruby and Java, I'd pick Ruby and Rails, and then I'd be _very_ careful with programming disciplines.
If I was starting a new enterprise project for a large company, I'd write the backend servers in Java, and I'd consider writing the frontend in Ruby, especially if the frontend was web based.
For thick client apps, I'd likely write them in Ruby using LimeLight on the front end.