问题
I am using Rails 3.1.3, JRuby 1.7.6, and Warbler 1.3.8
Note This was not happening when using JRuby 1.6.7 - but we recently tried to update the JRuby version, and that is when this issue started.
We use Warbler to package our ruby on rails application into a WAR file. That process pre-compiles all the assets and everything works fine (seems to work fine, the command is successful)
We then deploy the WAR file with our Software (which uses a JRuby environment - 1.7.6 - and uses Jetty as a web server)
When the server tries to unpack and deploy the WAR file, we get the following error:
org.jruby.rack.RackInitializationException: No such file or directory - /home/production/var/tmp/Jetty_0_0_0_0_2525_ui.4.1.4.war____.ed5d4m/webapp/WEB-INF/jar:file:/home/production/var/tmp/Jetty_0_0_0_0_2525_ui.4.1.4.war____.ed5d4m/webapp/WEB-INF/lib/gems.jar!/gems/activesupport-3.1.3/lib/active_support/locale/en.yml
from org/jruby/RubyFile.java:838:in `stat'
I have checked in the unpacked WAR directory, gone to the gems.jar file, unpacked it, and checked all the files - the activesupport 3.1.3 en.yml file is there. The permissions on the file are as I would expect them to be (i.e. nothing seems different than it was previously with JRuby 1.6.7)
EDIT There is a bug between JRuby 1.7.6 and Warbler 1.3.8 - https://github.com/jruby/warbler/issues/197 After encountering that, I tried using Warber 1.4.0.beta2 - which fixes the warbler-jruby bug, but that fix only gets me far enough to receive the missing locale/en.yml file again.
Any suggestions? Thanks!
回答1:
I tried to reproduce your problem, but was unable to. I installed Rails 3.1.3, Warbler 1.4.0.beta2, and JRuby 1.7.6. After creating a new Rails application, I created a controller / view, precompiled my assets, then created a war by running warble
. I then dumped my WAR into Jetty 9.0.6 (v20130930).
I was able to navigate to the application and plenty of files are located in the WAR at WEB-INF/gems/gems/activesupport-3.1.3
(253 in all).
Do you have a custom warbler file that might be changing how you build your WAR? Perhaps you can remove it and try "stock" warbler configs.
回答2:
I would try warbler 1.4.0.beta2 just to see if it's fixed
来源:https://stackoverflow.com/questions/19862214/warbler-not-including-activesupport-locale-files