Hi
Firstly, thanks for JRuby!
I’m trying to use jruby-complete.jar for easy deployment of JRuby code.
I’ve boiled down my problem to this gist JRuby favours scripts on PATH · GitHub
From my understanding of the wiki etc (and my reading of the
ArgumentProcessor.resolveScript code) I’d expect JRuby to favour the gem
script inside the jruby-complete.jar at META-INF/jruby.home/bin/gem
Instead its favouring scripts found on PATH and I see:
I am not really gem
[“list”]
- Is my expectation/understanding correct? If so, is there something
obvious I’m missing/doing wrong? - If not, how can I get JRuby to use the internal gem script?
On my dev machine, JRuby run as “java -cp jruby-complete.jar
org.jruby.Main
-S gem list” always picks up rbenv’s gem script, which isn’t even ruby
(its
a shell script shim)
If I remove this shim script from the PATH, its just happening to work
because the next gem script it encounters (from MRI) works with JRuby.
In any case, cleaning the PATH is not really an option, as some scripts
need to find other commands via PATH (e.g. bundler needs git)
(I’ve replicated this on OS X apple java 1.6, oracle java 1.7 and linux
opensdk. JRuby 1.6.7, 1.6.7.2 and 1.7.0-preview2)
Any pointers in the right direction would be most appreciated!
thanks
:lachie