private void LoadRubyRuntime() { scriptRuntime = Ruby.CreateRuntime(); ICollection<string> searchPath = new List<string>(); searchPath.Add(PickFullPath); //设置加载ruby以及IronRuby库的路径 string rubyLibPath = GetRubyLibPath(); searchPath.Add(Path.Combine(rubyLibPath, @"ruby/1.9.1")); searchPath.Add(Path.Combine(rubyLibPath, @"ironruby")); scriptRuntime.GetRubyEngine().SetSearchPaths(searchPath); }
private void LoadRubyRuntime() { scriptRuntime = Ruby.CreateRuntime(); ICollection<string> searchPath = new List<string>(); searchPath.Add(PickFullPath); //设置加载ruby以及IronRuby库的路径 searchPath.Add(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"ruby/1.9.1")); searchPath.Add(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"ironruby")); scriptRuntime.GetRubyEngine().SetSearchPaths(searchPath); }