<boc_tothefuture[>
Hi there.. I am trying to get JRuby up and running using JSR233 and hitting some issues. This is running inside of another system that supports multiple JSR233 scripting engines that I am trying to add JRuby support to. I have hit a couple of odd issues getting it up and running.. The current issue I am hitting is that when I do a require 'logger' it errors out saying that "undefined method `basename' for class
<boc_tothefuture[>
java.io.File:Java::JavaLang::Class". I would think that would happen if I had imported java.io.File, but I haven't.. Also, I thought the docs said that ruby classes would prefer ruby objects over Java ones unless you were explicit.
<headius[m]>
hmmm yeah that is a good theory and I'd still suspect something is importing java.io.File into the top level namespace
<headius[m]>
Ruby code will always use Ruby classes, but there's only one entry for "File" in the namespace, and the Java one could overwrite the Ruby one
<headius[m]>
definitely would break a lot of stuff
<boc_tothefuture[>
hmm.. can "unset" that before the require?
<boc_tothefuture[>
What i pasted was the only ruby file being loaded.. Not sure what else could import that into the namespace.
<boc_tothefuture[>
I did have to manually set the loadpaths for it to even find the logger which I thought was also interesting.
<headius[m]>
You can't really unset it because it has already been overwritten. I am not sure what would be causing that, since it is clearly something we would not do within jruby itself
<headius[m]>
The code looks fine, could you print out what File is before logger is required?
<headius[m]>
yeah you really shouldn't need to add those class path entries. Logger is a standard library and should just be loadable out of the complete jar
<headius[m]>
If you can make this into a little reproducible repository I can try to test it out
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]