Posted by
vivekp on November 6, 2008 at 6:29 PM PST
GlassFish v3 Prelude supports
deployment of Rails applications and also
other dynamic language based frameworks such as Grails, which is based
on groovy language.
The support for dynamic languages based frameworks on GlassFish v3
comes through it's modular and extensible architecture and support for
pluggable Containers. Rails and Grails are just different Container
which are also OSGi bundles that get plugged in to GlassFish v3. Read
on the overview of GlassFish v3 Prelude architecture in
Jerome's
blog.
The architecture diagram below shows how support for Ruby on Rails
applications
is realized in side GlassFish v3 Prelude
Key features
- Rails application deployment
- natural Rails way, no packaging
- asadmin deploy myRailsApp/
- Choice to deploy as WAR also
- JRuby -S install warbler
- warble
- asadmin deploy
myRailsApp.war
- Needs JRuby runtime to run
the Rails application
- Install JRuby runtime and
ready-to-go set of gems (Rails, JDBC-MySQL adapter, warbler) from
GlassFish v3 Update Center
- glassfish-install/bin/updateool

- The simply deploy your
Rails application on GlassFish
- asadmin deploy
myRailsApp/
- If you have your own JRuby
installation with the set of required gems then you need to tell
GlassFish where it is available. you can chose to do one of the
following
- java
-Djruby.home=/tools/jruby-1.1.5 modules/glassfish.jar
- Edit domain.xml
(glassfish-install/glassfish/domains/domain1/config/domain.xml) and add
- <jvm-options>-Djruby.home=/tools/jruby-1.1.5</jvm-options>
- Access to GlassFish v3
JavaEE features
- Host your JavaEE, Grails,
JRuby/Rails applications side by side
- Easier, scalable deployment
- Rails is single threaded.
GlassFish keeps JRuby runtimes in a pool, which can be configured based
on the available resources to scale better
- Read here
on how to configure JRuby runtime pool
- NetBeans
6.5 RC2 supports development,
deployment and debugging of Rails applications on GlassFish v3 Prelude
Now, go and get
GlassFish
v3 Prelude and start developing,
deploying your Rails applications on it:-) You may like to bookmark
JRuby
GlassFish wiki for
details and if you have questions let us know through the
mailing list
or report an issue on the
issue
tracker.