Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/main/java/org/jruby/runtime/load/LoadService.java
Original file line number Diff line number Diff line change
@@ -229,7 +229,10 @@ public void init(List prependDirectories) {
if (jrubyHome != null) {
// siteDir has to come first, because rubygems insert paths after it
// and we must to prefer Gems to rubyLibDir/rubySharedLibDir (same as MRI)
addPath(RbConfigLibrary.getSiteDir(runtime));
String siteDir = RbConfigLibrary.getSiteDir(runtime);
if (new File(siteDir).exists()) {
addPath(siteDir);
}
// if vendorDirGeneral is different than siteDirGeneral,
// add vendorDir, too
// adding {vendor,site}{Lib,Arch}Dir dirs is not necessary,
@@ -241,8 +244,6 @@ public void init(List prependDirectories) {
if (rubygemsDir != null) {
addPath(rubygemsDir);
}
addPath(RbConfigLibrary.getRubySharedLibDir(runtime));
// TODO: merge
addPath(RbConfigLibrary.getRubyLibDir(runtime));
}

0 comments on commit c5b3e02

Please sign in to comment.