|
From: <caw...@us...> - 2007-08-09 17:03:43
|
Revision: 2957
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=2957&view=rev
Author: cawilliams
Date: 2007-08-09 10:03:39 -0700 (Thu, 09 Aug 2007)
Log Message:
-----------
fix #5494- Force RDT to look in /usr/local for a ruby installation and if found prefer it over /usr
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMType.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMType.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMType.java 2007-08-09 16:30:53 UTC (rev 2956)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/StandardVMType.java 2007-08-09 17:03:39 UTC (rev 2957)
@@ -293,8 +293,16 @@
p.destroy();
}
}
- }
-
+ // If we find one at /usr/bin/ruby, try to see if there's one at /usr/local/bin/ruby. If so, then prefer that.
+ if (rubyExecutable != null && rubyExecutable.getAbsolutePath().startsWith("/usr/bin")) {
+ File rubyHome = tryLocation(new File("/usr/local/bin/ruby"));
+ if (rubyHome != null) return rubyHome;
+ }
+ }
+ return tryLocation(rubyExecutable);
+ }
+
+ private File tryLocation(File rubyExecutable) {
if (rubyExecutable == null) {
return null;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|