Skip to main content

Redmine on GlassFish - Ruby-on-Rails Project Management Application

Posted by arungupta on May 23, 2008 at 6:08 AM PDT

is a flexible project management web application
written using Ruby on
framework. The href="">feature list
is pretty comprehensive from the usual suspects like multiple projects,
role-based control, forums/wikis/SCM for each project to enterprise
level features such as LDAP-authentication and multiple languages. It
is cross-platform and cross-database and deploys very nicely on href="">GlassFish

GlassFish v3 modularity and extensibility allows Rails applications to
be deployed href="">without
any modification (no WARing). This blog explains the
steps on how to deploy Redmine on GlassFish and shows some screenshots
later. More
documentation is available in href="">Redmine

  1. Check out the most stable release of Redmine by giving the

    cellpadding="2" cellspacing="2">
    >svn co redmine-0.7
  2. Configure the database
    1. Start your MySQL server 

      cellpadding="2" cellspacing="2">
      >sudo mysqld_safe
      --user root

      Starting mysqld daemon with databases from /usr/local/mysql/data
    2. Create the database as:

      cellpadding="2" cellspacing="2">
      -S rake db:create

      (in /Users/arungupta/testbed/redmine/redmine-0.7)
    3. Migrate the database as:

      cellpadding="2" cellspacing="2">
      -S rake db:migrate

      (in /Users/arungupta/testbed/redmine/redmine-0.7)

      == 1 Setup: migrating

      -- create_table("attachments", {:force=>true})

         -> 0.2840s

      -- create_table("auth_sources", {:force=>true})

         -> 0.0540s

      -- create_table("custom_fields", {:force=>true})

         -> 0.0430s

      -- create_table("custom_fields_projects", {:id=>false,

         -> 0.0080s

      -- create_table("custom_fields_trackers", {:id=>false,

         -> 0.0500s

      . . .

      == 90 ChangeVersionsNameLimit: migrating

      -- change_column(:versions, :name, :string, {:limit=>nil})

         -> 0.0220s

      == 90 ChangeVersionsNameLimit: migrated (0.0220s)

      == 91 ChangeChangesetsRevisionToString: migrating

      -- change_column(:changesets, :revision, :string, {:null=>false})

         -> 0.0210s

      == 91 ChangeChangesetsRevisionToString: migrated (0.0230s)

      == 92 ChangeChangesFromRevisionToString: migrating

      -- change_column(:changes, :from_revision, :string)

         -> 0.0130s

      == 92 ChangeChangesFromRevisionToString: migrated (0.0150s)
  3. Download, Install and Configure GlassFish v3
    1. Download GlassFish v3 from href="">here.
    2. Unzip the downloaded bundle.
    3. Add the following fragment as the last line in
      "glassfishv3-tp2/glassfish/config/asenv.conf" file:

      cellpadding="2" cellspacing="2">
  4. Deploy Redmine as:

    cellpadding="2" cellspacing="2">
    deploy redmine-0.7

    Command deploy executed successfully.

    ... and the GlassFish console shows:

    cellpadding="2" cellspacing="2">
    21, 2008 4:58:30 PM com.sun.enterprise.rails.RailsDeployer

    INFO: Loading application redmine-0.7 at /redmine-0.7

    May 21, 2008 4:58:30 PM 

    INFO: Starting Rails instances

    May 21, 2008 4:58:37 PM 

    SEVERE: JRuby limited openssl loaded. gem install jruby-openssl for
    full support.

    May 21, 2008 4:58:42 PM com.sun.grizzly.jruby.RubyObjectPool$1 run

    INFO: Rails instance instantiation took : 11979ms

    May 21, 2008 4:58:42 PM com.sun.enterprise.v3.deployment.DeployCommand

    INFO: Deployment of redmine-0.7 done is 12091 ms

That's it, your application is ready to be used! Here are some screen
snapshots from my trial run:

href=""> style="border: 0px solid ; width: 700px; height: 613px;" alt=""


href=""> style="border: 0px solid ; width: 700px; height: 222px;" alt=""

href=""> style="border: 0px solid ; width: 700px; height: 613px;" alt=""

href=""> style="border: 0px solid ; width: 700px; height: 613px;" alt=""

href=""> style="border: 0px solid ; width: 700px; height: 613px;" alt=""

href=""> style="border: 0px solid ; width: 700px; height: 613px;" alt=""

href=""> style="border: 0px solid ; width: 700px; height: 613px;" alt=""

powered by the GlassFish Application Server provides all the
good reasons on why you should consider using GlassFish instead of the
traditional deployment models for Ruby-on-Rails applications.

This application is also covered in href="">LAB
5539 as part of href="">FREE
20-week Ruby-on-Rails course by href="">Sang "with Passion" Shin.

Technorati: web2.0
jruby href="">ruby href="">glassfish

Related Topics >>


I've not tried setting up the subversion repository. You might consider asking that question on

I've installed Redmine using Apache and Thin, and successfully set up integration with Subversion. So, Redmine can create a new subversion repository for a project and can browse the repository. The repository creation works via mod_perl. Does the integration with Subversion work when using Glassfish? If so, what steps are required to set that up?

BTW, I tried with JRuby 1.1.3, Rails 2.0.2, MySQL and it worked! Do you have a public facing website for your deployment ?

Thanks pasi, did you file an JIRA issue for JRuby ?

Hi, Just a quick update: It's jruby that's the problem. With jruby-1.1.4 it works! Thanks again for a great tutorial.

Hi Arun, Thanks for the awesome tutorial. Have you possibly tried it with the following combination of software: glassfishv3-prelude jruby-1.1.5 redmine-0.7.3 postgresql-8.2 When accessing the website (remote-address:8080/redmine-0.7.3) the browser just sits a while (around 5 minutes) and then shows a blank page and the following exception is printed in the Glassfish log: [#|2008-12-02T17:45:30.366+0200|SEVERE|glassfish|javax.enterprise.system.core|_ThreadID=29;_ThreadName=Thread-3;|service exception java.lang.IllegalStateException: No Rails Instances available to satisfy the current request at com.sun.grizzly.jruby.RailsAdapter.service( at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service( at org.glassfish.scripting.rails.RailsApplication.service( at com.sun.enterprise.v3.server.HK2Dispatcher.dispath( at at at at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter( at com.sun.grizzly.http.DefaultProcessorTask.doProcess( at com.sun.grizzly.http.DefaultProcessorTask.process( at com.sun.grizzly.http.DefaultProtocolFilter.execute( at at com.sun.grizzly.DefaultProtocolChain.execute( at com.sun.grizzly.DefaultProtocolChain.execute( at com.sun.grizzly.http.HttpProtocolChain.execute( at com.sun.grizzly.ProtocolChainContextTask.doCall( at at com.sun.grizzly.util.WorkerThreadImpl.processTask( at |#] Do you have any idea what might be the issue? Thanks!

Firstly, I'd like to thank you for your great tutorial. Everything was very simple to get started! However, when I attempted to deploy a second application to the Glassfish v3 server, using the applications led to unexplained routing errors. I made sure to use all the same software versions as you, to make sure my applications were created with the same version of Rails/JRuby, etc. I was just curious if you had any experience with deploying multiple applications to a single instance of Glassfish, or any ideas as to what the problem might be. Thanks!

This is a known problem as described at: Please follow the workaround mentioned in the bug report.