• by Alifatisk on 12/23/2024, 12:27:57 AM

    JRuby is such an exciting technology, but I felt like this article was more focused on JBang and Javalin than JRuby, but I get it, the goal was to make it work in JRuby.

    Personally, I've been digging into using JavaFX with JRuby, we'll see how it goes.

    https://github.com/jruby/jrubyfx

    I think that has the perfect balance between the productivity of Ruby and the benefit of the JVM but allowing me to share standalone portable jar file.

  • by maxandersen on 12/23/2024, 8:41:26 AM

    creator of JBang here - nice article.

    one thing not mentioned is that you can already just do ‘jbang run@jruby’ and run jruby directly if you wish.

    At a time I looked into enabling more native jruby support so like jbang can run Java, jsh, groovy and kotlin add first class support for jruby and gems.

    If someone interested and know about how to package ruby apps in a jar + addditional files that would be all doable.

    And other option is how graalpy provided integration allowing use of //PIP to install packages.

    Just ping if interested :)

  • by brutuscat on 12/27/2024, 12:19:53 AM

    Thx for this! Is good to see that we can still interoperatividad.

    I did and presented something on these lines 11 years ago! When multiple ruby runtimes were a thing.

    https://speakerdeck.com/brutuscat/jruby-experiences

  • by kitd on 12/23/2024, 8:34:36 AM

    I like that this works, but it would be nice if it could all be done in JRuby without the Java shim.

    It feels like adding a JRubySource here [0] shouldn't be too tricky. See the Kotlin one for an example.

    [0] https://github.com/jbangdev/jbang/tree/main/src/main/java/de...

  • by steinuil on 12/22/2024, 11:27:46 PM

    I was expecting the post to go into using the JRuby API to run the scripts rather than shelling out to a binary and was left a little disappointed. Still, it looks like a nice way to get everything running quickly.

  • by theanonymousone on 12/23/2024, 4:55:13 PM

    Does this solution also guarantee IDE support for code completion in the Java libraries in the JRuby code? Such things are a huge deal(breaker) in the Java ecosystem. But maybe not in Ruby?

  • by dominicrose on 12/23/2024, 1:07:09 PM

    What about TruffleRuby?