Oracle GlassFish Server 3.0.1 Scripting Framework Guide

Introduction to JRuby and Rails on Oracle GlassFish Server

This section provides an overview of JRuby and Rails in the context of Oracle GlassFish Server.

What Is Ruby on Rails ?

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.

What Is JRuby ?

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:

To learn more about JRuby, see the JRuby Home page.

JRuby on Rails, GlassFish Server, and GlassFish v3 Gem

Developing and deploying Rails applications on Oracle GlassFish Server offers several advantages over using a typical web server for running Rails applications:

Rails applications can be deployed on GlassFish Server in either of two ways:


Note –

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.