you have to require the other files it uses too in the same engine. or you can add the paths to where the scripts can be found to the $LOAD_PATHS ($:) variable.
require a file: http://github.com/casualjim/ironrubymvc/blob/master/IronRubyMvc/Core/RubyEngine.cs#L279 add load paths http://github.com/casualjim/ironrubymvc/blob/master/IronRubyMvc/Core/RubyEngine.cs#L346 --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Wed, Sep 30, 2009 at 3:17 PM, Eelco Henderichs <li...@ruby-forum.com>wrote: > Dear users, > > I want to build a testscript scheduler / executer in C# that runs > several Ruby scripts in sequence. > > For this I use IronRuby with the following constuction: > > ScriptRuntime runtime = Ruby.CreateRuntime(); > ScriptEngine engine = runtime.GetEngine("rb"); > > loop through scripts: > engine.ExecuteFile("script.rb"); > > This works fine for basic scripts. However some scripts have class > definition that inherite from a base class. > When such a script (class < baseclass) is passed in: > engine.ExecuteFile("script.rb"); > > The following exception is thrown: > Microsoft.Dynamic > uninitialized constant Object::BaseClass > > I can not find a solution for this problem, so any suggestion is > welcome. If I need an other approuch, do hesitate to say so. Still > learning about Ruby integration in .NET > > Thanks in advance > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core