1

我在用 warbler 打包我的 JRuby 应用程序并运行它时遇到了一些麻烦。

我创建了一个简单的 sqlite3 应用程序,其中一个模型在通过jruby -S rails s.

但是,如果我尝试将其与jruby -S warble executable war打包的 Winstone-server 一起打包,则会崩溃

[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)

这是从哪里来的,我该如何运行?

4

1 回答 1

1

这是由于 JRuby 1.5.5 和更早版本中的一个错误影响了在 Windows 和包含空格的路径中运行可执行 jar。请参阅JRUBY-4774WARBLER-15

尝试将 JRuby 升级到 1.5.6 ( gem update jruby-jars),重建 war 文件,然后重试。

于 2010-12-20T18:40:00.643 回答