public static void main(String[] args) {
        try {
            if (args.length != 1 || StringUtils.isEmpty(args[0])) {
                System.err.println("RubyExecMain take only one parameter : a ruby script to run");
                System.exit(1);
            }
            final File rubyScript = new File(args[0]);
            if (!rubyScript.exists() || !rubyScript.canRead()) {
                System.err.println("RubyExecMain could not read the ruby script: " + rubyScript.getAbsolutePath());
            }
            BSFManager.registerScriptingEngine("ruby", JRubyEngine.class.getName(), new String[]{"rb"});
            final BSFManager rubyManager = new BSFManager();

            rubyManager.exec("ruby", rubyScript.getAbsolutePath(), -1, -1,
                             IOUtils.toString(new FileReader(rubyScript)));
        } catch (IOException ex) {
            ex.printStackTrace();
            System.exit(1);
        } catch (BSFException ex) {
            ex.printStackTrace();
            System.exit(1);
        }
    }