This section provides an overview of JRuby and Rails in the context of Oracle GlassFish Server.
Ruby is an interpreted, dynamically-typed, object-oriented programming language. It has a simple, natural syntax that enables developers to create applications quickly and easily. It also includes the easy-to-use RubyGems packaging utility for customizing a Ruby installation with additional plug-ins.
Rails is a web application framework that leverages the simplicity of Ruby and eliminates much of the repetition and configuration required in other programming environments. With Rails, you can create database-backed web applications, complete with models and tables, by running a few one-line commands.
To learn more about Ruby on Rails, see Ruby on Rails.
JRuby is a JavaTM implementation of the Ruby interpreter. While retaining many of the popular characteristics of Ruby, such as dynamic-typing, JRuby is integrated with the Java platform. With JRuby on Rails, you get the simplicity and productivity offered by Ruby and Rails and the power of the Java platform offered by JRuby, thereby giving you many benefits as a Rails developer, including the following:
Access the rich set of Java libraries from Rails applications
Use the powerful and secure support of Java Unicode strings with Rails applications
JRuby on Rails applications can spin off and pool multiple threads because JRuby uses Java threads, which map to native Ruby threads
To learn more about JRuby, see the JRuby Home page.
Developing and deploying Rails applications on Oracle GlassFish Server offers several advantages over using a typical web server for running Rails applications:
Provides a simple, integrated deployment environment; develop and deploy from a single toolkit
Enables deployment of multiple Rails applications to a single GlassFish Server instance
Makes it possible to configure a single Rails application to handle multiple requests
Rails applications can be deployed on GlassFish Server in either of two ways:
Deploy the application to a directory in the GlassFish Server domain.
Run the application using GlassFish v3 Gem.
A Gem is a Ruby package that contains a library or an application. Rails itself is a Gem that is installed on JRuby. See GlassFish v3 Gem for more information.