public override void Initialize()
        {
            DLRIntegrationAddIn addIn = CurrentSession.AddInManager.GetAddIn <DLRIntegrationAddIn>();

            _virtualConsole = new VirtualConsole(CurrentSession, Console);
            addIn.ScriptRuntime.IO.SetOutput(MemoryStream.Null, _virtualConsole.Output);
            addIn.ScriptRuntime.IO.SetErrorOutput(MemoryStream.Null, _virtualConsole.Output);
            HostingHelpers.GetDomainManager(addIn.ScriptRuntime).SharedIO.SetOutput(new VirtualStream(Console), _virtualConsole.Output);
            HostingHelpers.GetDomainManager(addIn.ScriptRuntime).SharedIO.SetErrorOutput(new VirtualStream(Console), _virtualConsole.Output);
            _commandLine = new RubyCommandLine();//(CurrentServer, CurrentSession);
            ConsoleOptions consoleOptions = new RubyConsoleOptions();

            addIn.ScriptRuntime.Globals.SetVariable("Session", CurrentSession);
            addIn.ScriptRuntime.Globals.SetVariable("CurrentSession", CurrentSession);
            addIn.ScriptRuntime.Globals.SetVariable("Server", CurrentServer);
            addIn.ScriptRuntime.Globals.SetVariable("CurrentServer", CurrentServer);

            _consoleThread = new Thread(t =>
            {
                _commandLine.Run(addIn.ScriptRuntime.GetEngine("rb"), _virtualConsole, consoleOptions);
            });
            _consoleThread.Start();

            base.Initialize();
        }