public File getHome() { return getHome(true); }
private String getRubiniusLibDir() { File lib = new File(getHome(), "lib"); // NOI18N return lib.isDirectory() ? lib.getAbsolutePath() : null; // NOI18N }
public synchronized String getHomeUrl() { if (homeUrl == null) { try { File r = getHome(); if (r != null) { homeUrl = r.toURI().toURL().toExternalForm(); } } catch (MalformedURLException mue) { Exceptions.printStackTrace(mue); } } return homeUrl; }
File _home = getHome(); assert _home != null : "home not null";
/** * Returns the basic Ruby interpreter command and associated flags (not * application arguments) */ public static List<? extends String> getRubyArgs(final RubyPlatform platform) { RubyExecutionDescriptor desc = new RubyExecutionDescriptor(platform); return getRubyArgs(platform.getHome().getAbsolutePath(), platform.getInterpreterFile().getName(), desc, null); }
public RubyExecutionDescriptor(final RubyPlatform platform, final String displayName, final File pwd, final String script) { this.platform = platform; this.displayName = displayName; this.pwd = pwd; this.script = script; this.useInterpreter = true; assert (pwd == null) || pwd.isDirectory() : pwd + " is a directory"; if (platform.hasRubyGemsInstalled()) { Map<String, String> env = new HashMap<String, String>(); GemManager.adjustEnvironment(platform, env); addAdditionalEnv(env); } if (platform.isJRuby()) { Map<String, String> env = new HashMap<String, String>(); String home = platform.getHome().getAbsolutePath(); env.put("JRUBY_HOME", home); // NOI18N env.put("JRUBY_BASE", home); // NOI18N env.put("JAVA_HOME", ExecutionUtils.getJavaHome()); // NOI18N addAdditionalEnv(env); } }
private void initializeUrlMaps() { File rubyHome = platform.getHome();
RubyPlatform platform = original.getPlatform(); if (platform != null) { String home = platform.getHome().getPath();
} else if (!Utilities.isWindows()) { File rubyHome = platform.getHome(); if (rubyHome != null) { File railsDir = new File(rubyHome, "/share/rails/railties"); // NOI18N