sagax has quit [Remote host closed the connection]
sagax has joined #jruby
fidothe has joined #jruby
<boc_tothefuture[>
@headius: I checked the code and couldn't see anything.. is there a way to set environment variables (GEM_HOME, etc) for the JSR223 implementation from either a system property or something else?
<headius[m]>
boc_tothefuture: easy enough to do it through code, evaluate `ENV['blah'] = 'whatever'`
<boc_tothefuture[>
That is what I am trying to do (from the framework) for all the rules. I will see how it works.. just felt kludgy.
<boc_tothefuture[>
oh.. I guess I could access the system properties and set it that way...
<headius[m]>
yeah it would be nice if these libraries that read environment also looked at properties but we are limited by what Ruby provides
<headius[m]>
a nicer way to set up a per-instance environment might be useful though
<boc_tothefuture[>
Yeah, I was looking for a programatic way to set it for all invocations of eval. But, I think I can handle that for the most part.. by setting a system property and then my library code can set those values.
<boc_tothefuture[>
hmm.. well that won't work for GEM_PATH
<boc_tothefuture[>
because then my lilbrary wont be found.. hmm
<headius[m]>
hmmm I will look at env stuff and see if we can get it from anywhere else
<headius[m]>
it pretty much just maps java.lang.System.getenv to a hash though
<headius[m]>
and you can't set env in System
<headius[m]>
you know about ENV_JAVA for properties yeah?
<boc_tothefuture[>
no.. I don't know anything about ENV_JAVA
<headius[m]>
ok it is just another hash but it is tied to Java properties
<headius[m]>
hash-like
<boc_tothefuture[>
Does JRuby read from that?
<headius[m]>
FWIW 223 is really what gets in your way here... our custom embedding API does provide a way to set up env
<boc_tothefuture[>
I know.. but I don't have a choice :(
<headius[m]>
yeah I figured
<headius[m]>
trying to see if there is another way to get around that
<headius[m]>
unfortunately this is all pretty well encapsulated
<boc_tothefuture[>
Ok, I am trying a hack with doing an eval setting the ENV in the eval before i return the ScriptEngine
<headius[m]>
the engine will be an instance of JRubyEngine but casting to that doesn't get you access to our embedding API or ENV access
<boc_tothefuture[>
that seems to work... but feels like a super hack.
<headius[m]>
I believe you could execute just "ENV" and get the hash back... it should cast to Map
<headius[m]>
that might work
<headius[m]>
at least it wouldn't feel as hacky as doing the env sets in an evaluated script
<boc_tothefuture[>
How does the embedding API do it?
den_d has quit [Read error: Connection reset by peer]
Iambchop has quit [Read error: Connection reset by peer]
lopex has quit [Read error: Connection reset by peer]
fidothe has quit [Read error: Connection reset by peer]
Liothen has quit [Read error: Connection reset by peer]
Iambchop has joined #jruby
<boc_tothefuture[>
hmmm.. maybe not because it doesn't seem to be respecting RUBYLIB.
den_d has joined #jruby
<boc_tothefuture[>
@headius: Is there something that would make it not respect RUBYLIB when set that way?
fidothe has joined #jruby
Iambchop has quit [Ping timeout: 264 seconds]
lopex has joined #jruby
Liothen has joined #jruby
Liothen has quit [Ping timeout: 272 seconds]
Liothen has joined #jruby
<headius[m]>
hmmm well it might be read during the initialization of the engine
<headius[m]>
so by the time the script runs you are too late
<headius[m]>
you need to set RUBYLIB why at this point?
<headius[m]>
I know you are trying to set up the execution env with paths to scripts etc, just wondering if maybe there is a more direct way to do this
Iambchop has joined #jruby
<headius[m]>
boc_tothefuture: there may be a better way to get some paths into the load sequence than using these envs
<headius[m]>
like $:
<headius[m]>
$: << some_path will add that path to search for scripts
<headius[m]>
better to use $LOAD_PATH I suppose
<boc_tothefuture[>
Yeah, wondering if I messed something up.. But RUBY_LIB should work? or is it only evaluated at engine startup or something?
<headius[m]>
I think that is the case
<boc_tothefuture[>
I do notice that RUBY_LIB doensn't show up in LOAD_PATH
<headius[m]>
we load it at startup to get an initial list of paths to search for scripts
<headius[m]>
from then on it is $LOAD_PATH
<headius[m]>
which is just an array of string paths you can append or prepend to
<boc_tothefuture[>
ok.. so just at startup. good to know.
<headius[m]>
it is possible GEM_HOME might be the same since normally RubyGems boots at start too... but it might load it lazily, I am not sure
<boc_tothefuture[>
that would make me sad, but I guess I will find out ;-)
<headius[m]>
yeah we are fighting against 223 and boot sequence at this point
<headius[m]>
we'll get you where you need to go though
<boc_tothefuture[>
OK, seems to respect GEM_HOME
<headius[m]>
cool
<boc_tothefuture[>
well, at least for installing GEMs...
Liothen has quit [Read error: Connection reset by peer]
Iambchop has quit [Read error: Connection reset by peer]
Iambchop has joined #jruby
Liothen has joined #jruby
<headius[m]>
that's a start
<headius[m]>
those various gem envs confuse me
<headius[m]>
there's also GEM_PATH and GEM_ROOT I think and I don't remember which ones do what
fidothe has quit [Read error: Connection reset by peer]
<headius[m]>
GEM_HOME sets the default repository to install into. GEM_PATH allows multiple local repositories to be searched for gems.
<headius[m]>
so one does install target and the other is where to look for installed?
<boc_tothefuture[>
well, GEM_HOME seems to get searched by default.
<headius[m]>
oh I bet I understand then
<headius[m]>
GEM_HOME can only be a single path
<headius[m]>
GEM_PATH can be multiple gem locations
fidothe has joined #jruby
<boc_tothefuture[>
Ok, it does seem to respect GEM_HOME on automatically loading gems.. so that is good news.
lopex has quit [Read error: Connection reset by peer]
lopex has joined #jruby
lopex has quit [Read error: Connection reset by peer]
lopex has joined #jruby
enebo[m] has quit [Ping timeout: 260 seconds]
dentarg[m] has quit [Ping timeout: 260 seconds]
JesseChavezGitte has quit [Ping timeout: 260 seconds]
TimGitter[m] has quit [Ping timeout: 260 seconds]
enebo[m] has joined #jruby
dentarg[m] has joined #jruby
JesseChavezGitte has joined #jruby
TimGitter[m] has joined #jruby
ur5us has joined #jruby
ur5us has quit [Ping timeout: 264 seconds]
CharlesOliverNut has quit [Ping timeout: 244 seconds]
KarolBucekGitter has quit [Ping timeout: 240 seconds]
TimGitter[m]1 has quit [Ping timeout: 240 seconds]
codeponpon[m] has quit [Ping timeout: 240 seconds]
kai[m] has quit [Ping timeout: 240 seconds]
hopewise[m] has quit [Ping timeout: 240 seconds]
enebo[m] has quit [Ping timeout: 240 seconds]
MattPattersonGit has quit [Ping timeout: 244 seconds]
kroth_lookout[m] has quit [Ping timeout: 244 seconds]
lopex[m] has quit [Ping timeout: 244 seconds]
kares[m] has quit [Ping timeout: 244 seconds]
byteit101[m] has quit [Ping timeout: 244 seconds]
GGibson[m] has quit [Ping timeout: 258 seconds]
ahorek[m] has quit [Ping timeout: 258 seconds]
UweKuboschGitter has quit [Ping timeout: 258 seconds]
MarcinMielyskiGi has quit [Ping timeout: 258 seconds]
daveg_lookout[m] has quit [Ping timeout: 258 seconds]
slonopotamus[m] has quit [Ping timeout: 268 seconds]
XavierNoriaGitte has quit [Ping timeout: 268 seconds]
ravicious[m] has quit [Ping timeout: 268 seconds]
rdubya[m] has quit [Ping timeout: 268 seconds]
ChrisSeatonGitte has quit [Ping timeout: 240 seconds]
headius[m] has quit [Ping timeout: 240 seconds]
nhh[m] has quit [Ping timeout: 265 seconds]
FlorianDoubletGi has quit [Ping timeout: 265 seconds]
RomainManni-Buca has quit [Ping timeout: 265 seconds]
TimGitter[m] has quit [Ping timeout: 246 seconds]
JulesIvanicGitte has quit [Ping timeout: 246 seconds]
BlaneDabneyGitte has quit [Ping timeout: 258 seconds]
jpsikorra[m] has quit [Ping timeout: 244 seconds]
boc_tothefuture[ has quit [Ping timeout: 244 seconds]
JesseChavezGitte has quit [Ping timeout: 260 seconds]
liamwhiteGitter[ has quit [Ping timeout: 260 seconds]
dentarg[m] has quit [Ping timeout: 268 seconds]
OlleJonssonGitte has quit [Ping timeout: 265 seconds]
TimGitter[m]1 has joined #jruby
boc_tothefuture[ has joined #jruby
KarolBucekGitter has joined #jruby
codeponpon[m] has joined #jruby
boc_tothefuture[ has quit [Quit: Bridge terminating on SIGTERM]
codeponpon[m] has quit [Client Quit]
KarolBucekGitter has quit [Client Quit]
TimGitter[m]1 has quit [Quit: Bridge terminating on SIGTERM]