0
votes

First, thanks for anyone who will help me.

I'm trying to run redmine 1.2.2 on Tomcat 7.0.22 (on Windows 7 x64) I'm using JRuby : jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_01) [amd64-java]

Here is my gem list :

*** LOCAL GEMS ***

activerecord-jdbc-adapter (1.2.1)
activerecord-jdbcmysql-adapter (1.2.1)
bouncy-castle-java (1.5.0146.1)
columnize (0.3.1)
i18n (0.4.2)
jdbc-mysql (5.1.13)
jruby-jars (1.6.1)
jruby-openssl (0.7.4)
jruby-rack (1.1.1)
rack (1.1.1)
rake (0.8.7)
rspec (1.3.0)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3.2)
rubyzip (0.9.5)
sources (0.0.1)
warbler (1.2.1)

My setup work well when I run jruby script/server -e production

About warbler : With JRuby 1.5.6, when I launch gem install warbler, it always fail with an IndexOutOfBoundException. I tried with different version, but no luck. So I setup JRuby 1.6.5 and setup warbler gem. Then, I copied it from the 1.6.5 setup to the 1.5.6 setup.

I tried with different warbler version, but it change noting, when I deploy the war in tomcat and try to access it, it fail.

If I use jruby-jars from 1.6.5, it fail with :

GRAVE: Application Error
org.jruby.rack.RackInitializationException: undefined method `name' for "activerecord-jdbc-adapter":String
    from org/jruby/RubyKernel.java:1863:in `==='
    from file:/C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/redmine-1.2.2/WEB-INF/lib/jruby-stdlib-1.6.5.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:217:in `matching_specs'

So I tried to decrease the version, if jruby-jars is >=1.6.0 && <= 1.6.4, it fail with :

INFO: /!\ FAILSAFE /!\  Tue Nov 29 23:14:11 +0100 2011
  Status: 500 Internal Server Error
  undefined method `raw_post' for nil:NilClass
    C:/Program Files/Apache Software Foundation/Tomcat 7.0/webapps/redmine/WEB-INF/vendor/rails/actionpack/lib/action_controller/params_parser.rb:50:in `parse_formatted_parameters'

With version 1.4.0, 1.5.0-1.5.6, it fail with :

GRAVE: Warning: error application could not be initialized
java.lang.NullPointerException
    at org.jruby.Ruby.<init>(Ruby.java:234)
    at org.jruby.Ruby.newInstance(Ruby.java:172)
    at org.jruby.rack.DefaultRackApplicationFactory.newRuntime(DefaultRackApplicationFactory.java:190)

And now... I have no more idea on how to run it on tomcat... please, help. Thanks

2

2 Answers

2
votes

I was able to get this to work by reverting to jruby-rack 1.0.10.

There appears to be an issue with jruby-rack >= 1.1.0 and rails versions >=2.3.12.

My setup:

% jruby -v
jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (Java HotSpot(TM) Client VM 1.6.0_29) [linux-i386-java]
% gem -v
1.6.2
% gem list

*** LOCAL GEMS ***

actionmailer (2.3.14)
actionpack (2.3.14)
activerecord (2.3.14)
activerecord-jdbc-adapter (1.2.1)
activerecord-jdbcmysql-adapter (1.2.1)
activeresource (2.3.14)
activesupport (2.3.14)
bouncy-castle-java (1.5.0146.1)
i18n (0.4.2)
jdbc-mysql (5.1.13)
jruby-jars (1.6.5.1)
jruby-openssl (0.7.4)
jruby-rack (1.0.10)
rack (1.1.3)
rails (2.3.14)
rake (0.8.7)
rubygems-update (1.6.2)
rubyzip (0.9.5)
sources (0.0.1)
warbler (1.3.2)
% git remote -v show  
origin  git://github.com/edavis10/redmine.git (fetch)
origin  git://github.com/edavis10/redmine.git (push)
% git branch
* 1.3-stable
  master
0
votes

I succeed to make it work :

jruby -v jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2010-12-03 9cf97c3) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_01) [amd64-java]

gem -v 1.3.6

* LOCAL GEMS *

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activerecord-jdbc-adapter (1.2.1)
activerecord-jdbcmysql-adapter (1.2.1)
activeresource (2.3.11)
activesupport (2.3.11)
bouncy-castle-java (1.5.0146.1)
columnize (0.3.1)
i18n (0.4.2)
jdbc-mysql (5.1.13)
jruby-jars (1.6.4)
jruby-openssl (0.7.4)
jruby-rack (1.0.10)
rack (1.1.1)
rails (2.3.11)
rake (0.8.7)
rspec (1.3.0)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3.2)
rubyzip (0.9.5)
sources (0.0.1)
warbler (1.3.2)

If it can help ;)