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

16th
Apr 2015
Christian Meier
@mkristian
Apr 16 2015 15:36
question about the executable jar: if I look at the code it ALWAYS executes the launch script which is META-INF/init.rb
how do I create a jar of my rails application and run java -jar app.jar script/rails s ?
@rtyler I think @ysb33r said he is going to fix it ;)
the wrappers thingy
Schalk W. Cronjé
@ysb33r
Apr 16 2015 15:56

@mkristian You should just be to do the following

jrubyJavaBootstrap {
  jruby {
    initScript = ‘script/rails.rb’
 }
}

If that does not work, it needs fixing.

Christian Meier
@mkristian
Apr 16 2015 15:57
but how do I run with the same jar rake db:setup ?
Schalk W. Cronjé
@ysb33r
Apr 16 2015 15:58
There is some bootstrap code that gets generated from src/main/resources/META-INF/gradle-plugins/bootstrap.java.template. You might want to suggest some improvements to that.
which does not solve MY problem but at least I can pass in all kind of switches like -Xdebug.loadService=true etc
Schalk W. Cronjé
@ysb33r
Apr 16 2015 16:02
I did not know about that - will look into whether it can be combined with what is currently being done.
The current process takes the csript you provided, then generates a java file which instantiates a Ruby engine and loads your script. The java file is compiled and included in your executable jar.
R. Tyler Croy
@rtyler
Apr 16 2015 16:04
some of that might no longer be necessary with some of @mkristian's jruby-mains work
Christian Meier
@mkristian
Apr 16 2015 16:09
what I would like to do is: if there is jar-bootstrap.rb file I do what jruby does with it. otherwise I just launch jruby with whatever arguments you give it
Schalk W. Cronjé
@ysb33r
Apr 16 2015 16:19
I’m fine with that as long as we try to keep backwards compatibility in terms of how the build.gradle DSL will look like for users
Christian Meier
@mkristian
Apr 16 2015 16:20
the only difference will be that it works without the init.rb script.