Ruby version mismatch when deploying war over tomcat
I am using Rvm and have install jruby-1.6.4 (with ruby 1.9.2) i use warbler to create the war file and deploy it over tomcat-6.0.4
the problem is while i run the application the tomcat logs shows ruby version used as 1.8.7
I checked the version of ruby thru rv开发者_JAVA百科m list and it shows the right version (1.8.7)
When i downgrade teh jruby to use 1.8.7 (by using JRUBY_OPTS=--1.8.7 the application works like charm
any idea on how to ensure that ruby version 1.9.2 is used by tomcat
Vivek
Try setting the Java property jruby.compat.version
to 1.9
in Tomcat.
Inside warble.rb (created when/if you call >warble config)
Warbler::Config.new do |config|
# stuff before
config.webxml.jruby.compat.version = "1.9"
# stuff after
end
This config (and a lot more) will actually already be present, yet commented out when the warble.rb file is generated.
http://caldersphere.rubyforge.org/warbler/
精彩评论