我在使用warbler并运行它的JRuby应用程序时遇到了一些麻烦。
我创建了一个简单的sqlite3-app,其中一个模型在通过jruby -S rails s
运行时效果很好。
但是,如果我尝试用jruby -S warble executable war
打包它,打包的Winstone服务器崩溃
[Winstone 2010/12/20 10:33:48] - Beginning extraction from war file
[Winstone 2010/12/20 10:33:50] - WARNING: The Servlet 2.4/2.5 spec XSD was unavailable inside the winstone classpath. Will be retrieved from the web if required (slow)
[Winstone 2010/12/20 10:33:50] - No webapp classes folder found - C:\Temp\winstone908137348044208817webroot\sqlite-test.war\WEB-INF\classes
[webapp 2010/12/20 10:33:51] - Warning: error application could not be initialized org.jruby.rack.RackInitializationException: no such file to load -- builtin/core_ext/symbol
at org.jruby.rack.DefaultRackApplicationFactory.newRuntime(DefaultRackApplicationFactory.java:85)
at org.jruby.rack.DefaultRackApplicationFactory.createApplication(DefaultRackApplicationFactory.java:177)
at org.jruby.rack.DefaultRackApplicationFactory.newErrorApplication(DefaultRackApplicationFactory.java:127)
at org.jruby.rack.DefaultRackApplicationFactory.init(DefaultRackApplicationFactory.java:45)
at org.jruby.rack.PoolingRackApplicationFactory.init(PoolingRackApplicationFactory.java:50)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:40)
at winstone.WebAppConfiguration.<init>(WebAppConfiguration.java:889)
at winstone.HostConfiguration.initWebApp(HostConfiguration.java:131)
at winstone.HostConfiguration.<init>(HostConfiguration.java:73)
at winstone.HostGroup.initHost(HostGroup.java:85)
at winstone.HostGroup.<init>(HostGroup.java:45)
at winstone.Launcher.<init>(Launcher.java:196)
at winstone.Launcher.main(Launcher.java:391)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main.launchWinstone(Main.java:67)
at Main.start(Main.java:72)
at Main.main(Main.java:97)
Caused by: org.jruby.exceptions.RaiseException: no such file to load -- builtin/core_ext/symbol
at (unknown).new(:1)
at (unknown).(unknown)(:1)
这是从哪里来的,我该如何运行?
答案 0 :(得分:1)
这是由于JRuby 1.5.5和早期版本中的一个错误导致在Windows和包含空格的路径中运行可执行jar。请参阅JRUBY-4774或WARBLER-15。
尝试将JRuby升级到1.5.6(gem update jruby-jars
),重建war文件,然后重试。