首先,感谢任何能帮助我的人。
我正在尝试在Tomcat 7.0.22上运行redmine 1.2.2(在Windows 7 x64上) 我正在使用JRuby: jruby 1.5.6(ruby 1.8.7 patchlevel 249)(2010-12-03 9cf97c3)(Java HotSpot(TM)64位服务器VM 1.7.0_01)[amd64-java]
这是我的宝石列表:
*** 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)
当我运行jruby script/server -e production
关于warbler:使用JRuby 1.5.6,当我启动gem install warbler
时,它总是因IndexOutOfBoundException而失败。我尝试了不同的版本,但没有运气。所以我设置了JRuby 1.6.5并设置了warbler gem。然后,我将它从1.6.5设置复制到1.5.6设置。
我尝试了不同的warbler版本,但它改变了注意,当我在tomcat中部署战争并尝试访问它时,它失败了。
如果我使用1.6.5中的jruby-jar,则会失败:
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'
所以我试图减少版本,如果jruby-jars是> = 1.6.0&& < = 1.6.4,它失败了:
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'
对于版本1.4.0,1.5.0-1.5.6,它失败了:
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)
现在......我不知道如何在tomcat上运行它...请帮忙。 感谢
答案 0 :(得分:2)
我能够通过恢复到jruby-rack 1.0.10来实现这一点。
jruby-rack >= 1.1.0 and rails versions >=2.3.12似乎存在问题。
我的设置:
% 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
答案 1 :(得分:0)
我成功地让它发挥作用:
jruby -v jruby 1.5.6(ruby 1.8.7 patchlevel 249)(2010-12-03 9cf97c3)(Java HotSpot(TM)64位服务器VM 1.7.0_01)[amd64-java]
宝石-v 1.3.6
*本地宝石*
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)
如果可以提供帮助;)