/** * Return <tt>null</tt> if there are no problems running gem. Otherwise * return an error message which describes the problem. */ String getRubyGemsProblems() { String gemTool = platform.getGemTool(); if (gemTool == null) { return getGemMissingMessage(); } String gemHome = platform.getInfo().getGemHome(); if (gemHome == null) { // edge case, misconfiguration? gem tool is installed but repository is not found return NbBundle.getMessage(RubyPlatformValidator.class, "RubyPlatformValidator.CannotFindGemRepository"); } File gemHomeF = new File(gemHome); if (!gemHomeF.isDirectory()) { // Is this possible? (Installing gems, but no gems installed yet return null; } return null; }
File gemToolDir = new File(platform.getGemTool()).getParentFile().getParentFile(); argList.add(platform.getGemTool()); argList.add(gemCommand);
gemPathList.setModel(createGemPathsModel(plaf)); refreshGemToolVersion(); gemToolValue.setText(plaf.getGemTool() + " (" + plaf.getInfo().getGemVersion() + ')'); // NOI18N color = UIManager.getColor("Label.foreground"); } else {