To develop and deploy Rails applications on the Enterprise Server, do the following:
Download and install JRuby.
Install Rails on top of your JRuby installation.
You can perform the above tasks by installing JRuby on your Enterprise Server instance in one of the following ways:
Installing JRuby and the associated Gems on your Enterprise Server from Update Tool.
Installing JRuby and Rails Gem directly
JRuby and other associated Gems are now available as IPS packages from Update Center. By downloading them using the Update Tool, you can install them directly on your Enterprise Server.
For information about the Update Tool, see Sun GlassFish Enterprise Server v3 Installation Guide.
Start the update tool:
as-install/bin/updatetool
From the Update Tool, choose the following packages from Available Add-Ons:
JRuby on GlassFish which contains JRuby 1.3.1
JRuby Gems which contains Rails 2.3.2, Warbler, jdbc-mysql, and activerecord-jdbcmysql-adapter packages.
Click Install, which will install the packages on your Enterprise Server instance.
Set your JRUBY_HOME environment variable to the location of your JRuby installation.
export JRUBY_HOME=/jruby-install-location
Add JRUBY_HOME/bin directory to your system path so that you can invoke JRuby from anywhere in your directory tree.
export PATH=$PATH:$JRUBY_HOME/bin
On the Windows operating system, use the following commands for Steps 4 and 5:
set JRUBY_HOME=C:\jruby-install-location
set PATH=%JRUBY_HOME%\bin;%PATH%
If GlassFish v3 JRuby IPS package was installed using update tool, then there is no need to set the jruby.home system property
To install your own JRuby instance as standalone, use the following procedure.
Go to JRuby download site JRuby Download Site.
Download jruby-bin-1.3.1.zip or the latest version.
Unpack the zip file:
unzip jruby-bin-1.3.1.zip
Set your JRUBY_HOME environment variable to the location of your JRuby installation:
export JRUBY_HOME=/jruby-install-location
Add JRUBY_HOME/bin directory to your system path so that you can invoke JRuby from anywhere in your directory tree:
export PATH=$PATH:$JRUBY_HOME/bin
If you want to use this JRuby installation with your Enterprise Server, use the following steps to inform and configure Enterprise Server instance with the location of the JRuby installation:
If you installed your JRuby as a standalone instance, you also need to install the required Rails and other Gems on it. To install Rails, use the following procedure.