Resolving "require"s when executing IronRuby from C#
- by James Sulak
I'm attempting to run an IronRuby script from C#:
var runtime = IronRuby.Ruby.CreateRuntime();
runtime.ExecuteFile("ruby/foo.rb");
foo.rb starts with a "require:"
#!/usr/bin/env ruby
require 'bar'
When I try this, I get an exception stating "no such file to load -- bar." The file "bar.rb" and the directory "bar" are both…