code: private void getRubygemsSetupScript(RubyStringBuilder builder) {
          File[] gemPaths = gemsConfig.getGemPath();
          if (gemHome == null && gemPaths == null) {
              return;
          }
  
          builder.appendLine("# Set up GEM_HOME and GEM_PATH for running outside of maven");
          builder.appendLine();
  
          if (gemHome != null) {
              builder.appendLine("ENV['GEM_HOME']='" + gemHome + "'");
          }
  
          if (gemPaths != null) {
              builder.append("ENV['GEM_PATH']='");
              String sep = "";
              for(File path: gemPaths) {
                  builder.append(sep + path);
                  sep = System.getProperty("path.separator");
              }
              builder.appendLine("'");
          }
  
          builder.appendLine();
      }
docs: TODO from rspec mojo - factor out to common!