Redmine on GlassFish - Ruby-on-Rails Project Management Application
Redmine is a flexible project management web application written using Ruby on Rails framework. The 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 GlassFish v3.
GlassFish v3 modularity and extensibility allows Rails applications to be deployed 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 Redmine Guide.
- Check out the most stable release of Redmine by giving the
command:
~/testbed/redmine >svn co http://redmine.rubyforge.org/svn/branches/0.7-stable redmine-0.7 - Configure the database
- Start your MySQL server
~/testbed/redmine >sudo mysqld_safe --user root
Starting mysqld daemon with databases from /usr/local/mysql/data - Create the database as:
~/testbed/redmine/redmine-0.7 >../jruby-1.1.1/bin/jruby -S rake db:create
(in /Users/arungupta/testbed/redmine/redmine-0.7) - Migrate the database as:
~/testbed/redmine/redmine-0.7 >../jruby-1.1.1/bin/jruby -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, :force=>true})
-> 0.0080s
-- create_table("custom_fields_trackers", {:id=>false, :force=>true})
-> 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) ===================
- Start your MySQL server
- Download, Install and Configure GlassFish v3
- Download GlassFish v3 from here.
- Unzip the downloaded bundle.
- Add the following fragment as the last line in
"glassfishv3-tp2/glassfish/config/asenv.conf" file:
JRUBY_HOME="/Users/arungupta/testbed/redmine/jruby-1.1.1"
- Deploy Redmine as:
~/testbed/redmine >./glassfishv3-tp2/glassfish/bin/asadmin deploy redmine-0.7
Command deploy executed successfully.
... and the GlassFish console shows:
May 21, 2008 4:58:30 PM com.sun.enterprise.rails.RailsDeployer registerAdapter
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.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
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 execute
INFO: Deployment of redmine-0.7 done is 12091 ms








Rails 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 LAB 5539 as part of FREE 20-week Ruby-on-Rails course by Sang "with Passion" Shin.
- arungupta's blog
- Login or register to post comments
- 305 reads
- Flag as offensive
- Email this Blog entry
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)






