I'm sure there will be more of these as we go on. The CWD issue is just one of those things in Java we're going to have to deal with. We simply can't set user.dir since we intend for JRuby to run multiple instances in the same VM, and frequently to run in controlled environments like servlet engines or app servers.

The attached patch fixes all places where CWD was causing issues for RubyGems installation. These fixes are not exhaustive, but they do not appear to cause any regressions in any of our tests or working apps.

One thing to look out for is any calls to getAbsolute(File|Path) and getCanonical(File|Path). These both end up using java.io.File and user.dir to expand paths, and so we must hack around that little side effect whenever these are called.

--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com

Attachment: cwd-fixes.patch
Description: Binary data

Reply via email to