These are chat archives for jruby-gradle/jruby-gradle-plugin

30th
Sep 2014
R. Tyler Croy
@rtyler
Sep 30 2014 14:51
@ysb33r I still can't get this bloody thing to work
rtyler @rtyler finds a user configuration error
R. Tyler Croy
@rtyler
Sep 30 2014 14:53
```
no main manifest attribute, in jruby-gradle-example.jar
@ysb33r this is with the code I've just pushed to that javaone demo repo, build.gradle
Schalk W. Cronjé
@ysb33r
Sep 30 2014 15:40
@rtyler on that experimental code... If you move your ruby layout to src/ruby and then use JRubyExec task to run rake you can already try stuff out without even having to look at what I am doing. There is an example in base README for running rake
I’ll have a look at your demo shortly
Schalk W. Cronjé
@ysb33r
Sep 30 2014 15:58
it builds for me, then when running i get
java -jar build/libs/jruby-gradle-example-all.jar
LoadError: no such file to load -- META-INF/init.rb
    load at org/jruby/RubyKernel.java:1081
  (root) at <script>:1
Exception in thread "main" org.jruby.embed.EvalFailedException: (LoadError) no such file to load -- META-INF/init.rb
    at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:133)
    at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1317)
    at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1310)
    at com.github.jrubygradle.jar.bootstrap.JarMain.run(bootstrap.java:30)
    at com.github.jrubygradle.jar.bootstrap.JarMain.main(bootstrap.java:44)
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- META-INF/init.rb
    at org.jruby.RubyKernel.load(org/jruby/RubyKernel.java:1081)
    at RUBY.(root)(<script>:1)
This just means there is something small missing in the gradle script. just one moment ...
R. Tyler Croy
@rtyler
Sep 30 2014 15:59
huh
how come yours is called "jruby-gradle-example-all.jar" ?
Schalk W. Cronjé
@ysb33r
Sep 30 2014 16:00
shadowJar creates a FOO-all.jar
so the non-executable is FOO.jar and the executable is FOO-all.jar
What is your entry point ruby script?
R. Tyler Croy
@rtyler
Sep 30 2014 16:04
I don't have an -all.jar
:(
Schalk W. Cronjé
@ysb33r
Sep 30 2014 16:04
did you do ./gradlew shadowJar ?
Also you need to tell it where your entry script is. If you don’t, it will look for ‘META-INF/init.rb'
Schalk W. Cronjé
@ysb33r
Sep 30 2014 16:10
if you need something else then do something like
jrubyJavaBootstrap {
    jruby {
        initScript = 'bin/rackup'
    }
}
ysb33r @ysb33r is getting some food first
R. Tyler Croy
@rtyler
Sep 30 2014 16:22
oh, you know what, I just ran the jar task
gak
@ysb33r I kind of wish these jars had the same behavior as WarMain in some cases, I very much like the java -jar mything.war -S somebin approach
but it makes sense that they're a single executable piece
Schalk W. Cronjé
@ysb33r
Sep 30 2014 16:40
Did you get it working?
R. Tyler Croy
@rtyler
Sep 30 2014 16:41
I unfortunately can't work on this right now
I've got to get a boatload of shit done today :(
I was playing with it on the bus :P
Schalk W. Cronjé
@ysb33r
Sep 30 2014 16:42
eish, tomorrow is wednesday.
R. Tyler Croy
@rtyler
Sep 30 2014 16:43
yeah, no kidding
I still have to rehearse my pitch for the Script Bowl
Schalk W. Cronjé
@ysb33r
Sep 30 2014 16:43
well, good luck with that
R. Tyler Croy
@rtyler
Sep 30 2014 16:47
he
Schalk W. Cronjé
@ysb33r
Sep 30 2014 21:23
I might be spending some time in Colorado next month