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.
Seems like a great way to get Ruby + UI/graphics
The glimmer framework also has an interesting approach there.
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 :)
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?
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...
Yes.
There are some extra trickery around ruby gems needing a virtual env to run reliably - but definitely open to adjust/provide needed hook in Jbang if not already present if anyone wants to take a stab at it.
[deleted]
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.
What about TruffleRuby?
[deleted]