irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' libs = " -r irb/completion" libs << " -r readline" libs << " -r rubygems" require 'rubygems' begin exists_debug_lib = require 'ruby-debug' if !exists_debug_lib.nil? && exists_debug_lib == true libs << " -r ruby-debug" end rescue end libs << " -r adaptation" if RUBY_PLATFORM =~ /(:?mswin|mingw)/ ENV_PATH = "/windows/temp" else ENV_PATH = "/tmp" end f = File.new("#{ENV_PATH}/adaptor_path.rb", "w") path="ADAPTOR_ROOT = \"" + "#{ADAPTOR_ROOT}\"" f.write("#{path}") f.close libs << " -r #{ENV_PATH}/adaptor_path.rb" libs << " -r adaptation/console/environment" exec "#{irb} #{libs} --simple-prompt"