Friday May 23, 2008
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.
| ~/testbed/redmine >svn co http://redmine.rubyforge.org/svn/branches/0.7-stable redmine-0.7 |
| ~/testbed/redmine
>sudo mysqld_safe
--user root Starting mysqld daemon with databases from /usr/local/mysql/data |
| ~/testbed/redmine/redmine-0.7
>../jruby-1.1.1/bin/jruby
-S rake db:create (in /Users/arungupta/testbed/redmine/redmine-0.7) |
| ~/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) =================== |
| JRUBY_HOME="/Users/arungupta/testbed/redmine/jruby-1.1.1" |
| ~/testbed/redmine
>./glassfishv3-tp2/glassfish/bin/asadmin
deploy redmine-0.7 Command deploy executed successfully. |
| 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 |








Posted by Arun Gupta in web2.0 | Comments[17]
|
|
|
|
|
Today's Page Hits: 5395
Total # blog entries: 1002
You rocks ! Thank for doing this ! It's have been in my to do list but never got to execute it.
Posted by TK on May 23, 2008 at 09:43 AM PDT #
Posted by Arun Gupta's Blog on May 29, 2008 at 07:16 AM PDT #
Thanks for the information. However I'm curious to know what is benefit of deploying a Rails Application in Glassfish ? Or in other words why should one consider deploying their Rails app in Glassfish ?
Posted by Andy Yasuna on June 02, 2008 at 10:48 AM PDT #
Andy, http://developers.sun.com/appserver/reference/techart/rails_gf/ describes exactly the set of reasons why Rails need to be powered by the GlassFish application server.
Posted by Arun Gupta on June 04, 2008 at 02:45 PM PDT #
Posted by Arun Gupta's Blog on June 30, 2008 at 11:05 AM PDT #
hi Arun,
thanks for creating this page, it is very helpful !
When I follow your steps to deploy redmine 0.7 to glassfish v3, I got this error, do u know why?
/Users/mei/Downloads/glassfishv3-tp2/glassfish/bin/asadmin deploy redmine-0.7FAILURE : Failed to load com.sun.enterprise.rails.RailsSniffer from ModuleClassLoader(name=org.glassfish.extras:gf-jruby-connector, parent=,URls[]=file:/Applications/glassfishv3-tp2/glassfish/modules/gf-jruby-connector-10.0-tp-2-SNAPSHOT.jar,),init=true,URls[]=file:/Applications/glassfishv3-tp2/glassfish/modules/gf-jruby-connector-10.0-tp-2-SNAPSHOT.jar,)
Command deploy failed.
Posted by mei on July 17, 2008 at 10:51 AM PDT #
I see the above mentioned error when I used this command to deploy the app /Users/mei/Downloads/glassfishv3-tp2/glassfish/bin/asadmin deploy redmine-0.7
but I don't see the error when I used this command:
/Users/mei/Downloads/jruby-1.1.2/bin/jruby -S glassfish_rails redmine-0.7
so it would be a bug in GF.
Posted by Mei on July 17, 2008 at 11:21 AM PDT #
Mei,
I followed the steps and could deploy easily. Here is the log that I saw:
INFO: Loading application redmine-0.7 at /redmine-0.7
Jul 17, 2008 4:56:14 PM
INFO: Starting Rails instances
Jul 17, 2008 4:56:16 PM
SEVERE: JRuby limited openssl loaded. gem install jruby-openssl for full support.
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
Jul 17, 2008 4:56:21 PM com.sun.grizzly.jruby.RubyObjectPool$1 run
INFO: Rails instance instantiation took : 6967ms
Jul 17, 2008 4:56:21 PM com.sun.enterprise.v3.deployment.DeployCommand execute
INFO: Deployment of redmine-0.7 done is 6977 ms
Here is how I start v3:
java -DJRUBY_HOME=/Users/arungupta/testbed/rails202/jruby-1.1.2 -jar modules/glassfish-10.0-tp-2-SNAPSHOT.jar
Are you using GlassFish v3 TP2 or trunk ?
Is it Rails 2.0.2 or 2.1 ?
Posted by Arun Gupta on July 17, 2008 at 03:57 PM PDT #
Hi Arun,
I'm using Rails 2.0.2 and GF V3 TP2, not the trunk.
The failing only happens when I used the asadmin deploy command.
e.g. /Users/mei/Downloads/glassfishv3-tp2/glassfish/bin/asadmin deploy redmine-0.7
It works fine if I use the following command to deploy
/Users/mei/Downloads/jruby-1.1.2/bin/jruby -S glassfish_rails redmine-0.7
Thanks,
Mei
Posted by mei on July 22, 2008 at 11:25 AM PDT #
Posted by Arun Gupta's Blog on August 28, 2008 at 05:50 AM PDT #
Posted by Arun Gupta's Blog on August 28, 2008 at 05:57 AM PDT #
Posted by Arun Gupta's Blog on September 05, 2008 at 10:19 PM PDT #
Posted by Arun Gupta's Blog on November 07, 2008 at 05:52 AM PST #
Thanks for the information. However I'm curious to know what is benefit of deploying a Rails Application in Glassfish ? Or in other words why should one consider deploying their Rails app in Glassfish ?
Posted by wow gold on March 12, 2009 at 12:34 AM PDT #
http://developers.sun.com/appserver/reference/techart/rails_gf/ describes the advantages of using GlassFish for running Rails applications.
Posted by Arun Gupta on March 12, 2009 at 06:17 PM PDT #
Posted by Arun Gupta's Blog on March 16, 2009 at 11:49 AM PDT #
Posted by Arun Gupta's Blog on March 16, 2009 at 11:53 AM PDT #