|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
executable war fileHello,
We are trying to make a war file with Jruby which will be executable in non-exploded form with 'java -jar execwar.war'. There is a problem with jruby-rack being able to load some of the rails files from the classpath. Here's the error: org.jruby.rack.RackInitializationException: No such file to load -- /Users/pivotal/workspace/execwar/WEB-INF/config/environment.rb from file:/Users/pivotal/workspace/execwar/execwar.war!/jruby/rack/rails.rb:32:in `load_environment' Since jruby is successfully interpreting /jruby/rack/rails.rb, it seems like it should be possible to interpret /WEB-INF/config/environment.rb as well. Can we force the usage of the "file:/.../execwar.war!/..." format to locate and load the environment.rb file? We've created a sample rails app to illustrate this problem. Instructions for compiling and running the war are in the README: http://github.com/pivotal/execwar Thanks, -- Chad --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: executable war fileseems there is a bug in the JRuby-Rack development version, I don't know if you are using it but when I execute its tests I get:
NativeException in 'Java::OrgJrubyRackRails::RailsRackApplicationFactory getApplication should load the Rails environment and return an application' That's pretty similar to what you get in your app. In theory you could override your RAILS_ROOT to use "execwar.war!/WEB-INF" adding it to the warble.rb with this option "config.webxml.rails.root = '/execwar.war!/WEB-INF'", but I did it in your sample app and it doesn't work at all. On Wed, Oct 28, 2009 at 8:45 PM, Chad Woolley <thewoolleyman@...> wrote: Hello, -- David Calavera http://www.thinkincode.net |
|
|
Re: executable war fileJust remember another thing.
I moved some jruby on rails applications to Jetty 7 recently and I had some initialization issues because I tryed to load a spring context in a rails initializer but the variable $servlet_context hadn't been initialized when that code ran. I solved it moving my code to a method and initialized the spring context on demand but perhaps you could try to use Jetty 6 and see what happens. On Thu, Oct 29, 2009 at 10:56 AM, David Calavera <david.calavera@...> wrote: seems there is a bug in the JRuby-Rack development version, I don't know if you are using it but when I execute its tests I get: -- David Calavera http://www.thinkincode.net |
|
|
Re: executable war fileOn Thu, Oct 29, 2009 at 3:34 AM, David Calavera
<david.calavera@...> wrote: > Just remember another thing. > > I moved some jruby on rails applications to Jetty 7 recently and I had some > initialization issues because I tryed to load a spring context in a rails > initializer but the variable $servlet_context hadn't been initialized when > that code ran. > > I solved it moving my code to a method and initialized the spring context on > demand but perhaps you could try to use Jetty 6 and see what happens. Yes, we got that error until we defined this in Main.java: context.setResourceBase(""); Then it went away. It seemed to be because Jetty couldn't determine the real root path / resource base automatically. Thanks -- Chad --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |