Reputation: 10208
I successfully created my war file using warble. I am trying to deploy my Rails 3 application in tomcat.
I am using Ruby 1.9.2 and jRuby 1.6.7 supports it.
I am using windows and set an environment variable JRUBY_OPTS to --1.9.
If I go to the console (cmd) and type jruby -v this is the answer:jruby 1.6.7 (ruby-1.9.2-p312).....
After deployed, when I execute the application it fails due to a syntaxis problem. Analyzing the log file I can see the following:
System
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.6.0_23) [Windows XP-x86-java]
Why is it using ruby 1.8.7? That is causing my error! I tried to add SET RAILS_OPTS=--1.9.2 to my tomcat startup script but it has the same behaviour.
Note: If I start the server using jruby -S rails S it works well, it starts webrick using 1.9.2. But if I generate the WAR it executes using 1.8.7.
Any idea?
Upvotes: 0
Views: 862
Reputation: 26743
If you run:
warble config
this creates a config file, config/warble.rb
. Open this file, and uncomment the following line:
# config.webxml.jruby.compat.version = "1.9"
and then repackage your war with warble.
Upvotes: 3