Take the 2-minute tour ×

What is the best way to put together a "shortcut" to launch a IronRuby REPL with some .NET assemblies preloaded? I think there is a way to do this in Powershell (via Snapin or Module) and I'm looking for something similar in IronRuby.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

create a bat file that executes

ir -S irb -r irb/completion -r bin/Assembly1.dll -r bin/Assembly2.dll

share|improve this answer
Thanks Jim. Seems simple enough. +1&answer –  BuddyJoe Apr 22 '10 at 18:35
How would you pre-instantiate some objects too. Like a xd = System.Xml.Document ? Do you put these after the first line in the bat file? I couldn't get this way to work. –  BuddyJoe Apr 23 '10 at 13:25
You could use the -e parameter or create a ruby file and put those in there. I prefer the ruby file then you can do: ir -S irb -r irb/completion -r bin/Assembly1.dll -r lib/initializer.rb –  Casual Jim Apr 24 '10 at 8:44

Your Answer


