Rails accelerates and simplifies the development of Web applications, but it makes people feel immature, especially in terms of high-end enterprise-level functions. On the other hand, the speed, stability, and functions of the Java platform and its virtual machines, libraries, and application servers have been improved. It is now recognized as a leading platform for developing high-end server applications. However, if the Java platform is not associated with emerging languages such as Ruby, it may fall behind the popular trend.
Sample Code:
Require "java" include_class "java. util. treeSet "include_class" com. example. callMe "include_class" com. example. ISpeaker "puts" Hello from ruby "set = TreeSet. newset. add "foo" set. add "Bar" set. add "baz" set. each {| v | puts "value: # {v}"} cm = CallMe. newcm. hello $ globalCM. helloclass CallJavainclude ISpeakerdef initialize super @ count = 0 enddef say (msg) puts "Ruby saying # {msg}" enddef addOne (from) # m. synchronize {@ count + = 1 puts "Now got # @ count from # {from}" #} endend