This question is a bit subjective, and "replace Java EE" goes a little far, but you can certainly build scalable enterprise grade applications in Ruby on Rails.
My observation of the Ruby ecosystem, however, is that there are more platform dependencies that can trip you up and the variety of third party libraries to bring in complimentary functionality may not be as wide as you would get in Java.
On the other hand, the gems infrastructure is pretty neat and line-for-line you will get more function out of less actual code in ruby.
Finally, and this may matter as you need to scale up a team, I think it is easier to find experienced Java EE devs than it is to find experienced Rails devs.