public
Description: JBoss/Rails Integration
Homepage:
Clone URL: git://github.com/bobmcwhirter/jboss-rails.git
README.markdown

Overview

JBoss Rails is a deployer for JBoss AS 5.x to enable deployment of Ruby-on-Rails (RoR) projects. Applications run on the JVM by way of JRuby and JRuby-Rack.

Deployment

Live application directories can be deployed, allowing editing of views and controllers without having to redeploy the application.

A JBoss Rails deployment descriptor placed in the server's deploy/ directory will cause immediate deployment of the application. Editing, touching, or removing the descriptor will cause either a redeployment or an undeployment.

Deployment Descriptor

Once installed, the deployer recognizes deployment descriptors matching the pattern of *-rails.yml. This YAML file contains a configuration tree specifying the deployment information.

An example for groundhog-rails.yml

application: 
  RAILS_ROOT: /home/bob/checkouts/groundhog
  RAILS_ENV: development
web: 
  context: /
  • The application.RAILS_ROOT entry points to RAILS_ROOT of the application to be deployed.
  • The application.RAILS_ENV entry sets the RAILS_ENV for the deployment.
  • The web.context entry describes the URL to which the application should be bound.

Scheduler

Scheduled tasks can now be deployed with your application.

An example of config/jboss-scheduler.yml

github.commit.poller:
  description: Poll projects for GitHub commits
  cron: 0 */15 * * * ?
  task: Github::CommitPoller

This will call the run() method on RAILS_ROOT/app/scheduler/github/commit_poller.rb every 15 minutes.

Other Projects

To facilitate usage of JBoss Rails from a traditional Rails application, the JBoss Rails Plugin installs easily under your application's vendor/plugins/ directory and provides a set of Rake tasks to make deploying and undeploying applications super-simple.

A pre-configured version of JBoss AS can be installed with via the JBoss Rails Plugin, or manually from GitHub.