views:

62

answers:

1

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.

+1  A: 

create a bat file that executes

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

Casual Jim
tyndall
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.
tyndall
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