make jbang able to run jruby scripts/apps #8916
Replies: 2 comments 5 replies
-
|
I think there's ways to do it with the current JRuby JBang support, and perhaps improvements we could come up with. jbang works right now using the complete jar, which contains everything necessary to run JRuby itself: There's some permissions needed in newer JDKs (and we should talk about how to make jbang do that automatically), but it works well enough. The next phase I think you're talking about would be the ability to do Typical Ruby users don't have any build or compile step for their apps. They just run them from source on the filesystem every time. That's not to say that we couldn't transparently pack those sources up into a runnable jar before running, but why? |
Beta Was this translation helpful? Give feedback.
-
|
Here's a session similar to the Edit: submitted too early... The trick here is adding the main script's host dir into Obviously there's a couple warnings here we're flagging away in the normal JRuby launcher shell script, and I'm not sure why that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Watching https://www.youtube.com/watch?v=vagyIcmIGOQ got me reminded why I liked to play with ruby in my past - so I wanted to revisit if there is a way to get ruby to be better integrated with jbang.
jbang is nothing more than a thin wrapper around jvm build tool chain.
A simplified description is that for java we fetch dependencies, call javac, compile into a directory which we then jar up and then run that jar.
that works for kotlin, groovy, markdown and jshell source files.
I'm wondering how much it would take to enable for ruby source - but last time I looked i didn't find a good "run ruby from a jar" solution ...is there one you think we could apply?
note: maybe ruby is more like python and we'll need something like https://github.com/jython/jbang-catalog that implements PEP-723 to define pypy deps - and wonder if similar exist for ruby we could utilize?
Beta Was this translation helpful? Give feedback.
All reactions