Exit Print View

Sun GlassFish Enterprise Server v3 Scripting Framework Guide

  This Document Entire Library
Print View

Document Information

Preface

1.  Using JRuby on Rails With Sun GlassFish Enterprise Server

Introduction to JRuby and Rails on Sun GlassFish Enterprise Server

What Is Ruby on Rails ?

What Is JRuby ?

JRuby on Rails, the Sun GlassFish Enterprise Server v3, and the GlassFish v3 Gem

Installation and Configuration of JRuby

To Install JRuby and Rails from Update Center

To Install JRuby as Standalone

To Install Rails Gem on JRuby

Enterprise Server v3 JRuby Container Configuration

Configuring JRuby Container Through Asadmin CLI

Configuring JRuby Runtime Pool

Configuring JRuby Container Through Administration Console

To Configure JRuby Container from Administration Console

Creating a Simple Rails Application

To Create the hello Application

To Create the Controller and the View

To Pass Data From the Controller to the View

To Use Rails Without a Database

Deploying and Running a Rails Application

To Deploy the Rails Application as a Directory

Accessing a Database From a Rails Application

To Set Up the MySQL Database Server

To Create a Database-Backed Rails Application

Accessing Java Libraries From a Rails Application

To Create the Rails Application That Accesses Java Libraries

To Create the Views That Display the Images Generated by Java2D Code

To Add Java2D Code to a Rails Controller

To Run a Rails Application That Uses Java 2D Code

Monitor Rails Applications on Enterprise Server v3

Monitoring for JRuby Container

Viewing JRuby Container Statistics

GlassFish v3 Gem

To Install the GlassFish v3 Gem

To Run a Rails Application on GlassFish v3 Gem

To Deploy and Run the Database-Backed Web Application

Using GlassFish v3 Gem CLI

Introduction to Warbler

What Is Warbler ?

Creating and Deploying a Simple Rails Application with Warbler

To Create a Rails Application

To Deploy the WAR File

Further Information

2.  Developing Grails Applications

3.  Jython on Django

4.  Scala and Lift

5.  PHP

Introduction to JRuby and Rails on Sun GlassFish Enterprise Server

This section gives you an overview of JRuby and Rails on the Sun GlassFish Enterprise Server by explaining the following concepts:

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 Java 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 JRuby.

JRuby on Rails, the Sun GlassFish Enterprise Server v3, and the GlassFish v3 Gem

Developing and deploying your Rails application on the Sun GlassFish Enterprise Server gives you the following advantages over using a typical web server used for running Rails applications:

You have the following options for deploying a Rails application on GlassFish Server:

A Gem is a Ruby package that contains a library or an application. In fact, Rails itself is a Gem that is installed on JRuby. For more details on GlassFish v3 Gem, see GlassFish v3 Gem.