Re: [Ironruby-core] calling ruby scripts from C#

2009-10-01 Thread Eelco Henderichs
Thanks for all the information. Being new to IronRuby, I will need all the info I can get and will most probably be back with futher questions. -- Posted via http://www.ruby-forum.com/. ___ Ironruby-core mailing list [email protected] http://r

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread CDurfee
d to [email protected] To "[email protected]" cc "[email protected]" Subject Re: [Ironruby-core] calling ruby scripts from C# Apologies if my earlier answer was rude. I wasn’t trying to be rude, and looking at it I reali

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Jim Deville
[mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, September 30, 2009 11:32 AM To: [email protected] Cc: [email protected]; [email protected] Subject: Re: [Ironruby-core] calling ruby scripts from C# Indeed. We came to Ruby

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread CDurfee
nd to [email protected] To "[email protected]" cc "[email protected]" Subject Re: [Ironruby-core] calling ruby scripts from C# Makes sense, that’s standard Ruby for you. JD From: [email protected] [

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Tomas Matousek
@rubyforge.org Cc: [email protected] Subject: Re: [Ironruby-core] calling ruby scripts from C# Makes sense, that’s standard Ruby for you. JD From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, September

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Jim Deville
[email protected] Subject: Re: [Ironruby-core] calling ruby scripts from C# Agreed. We found if we changed the definition of class C, unless we did something like 'load', it would continue to use the old definition from the first load. -- Chuck -- Chuck Durfee Lead Software Architect, C

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread CDurfee
s Matousek Sent by: [email protected] 09/30/2009 10:27 AM Please respond to [email protected] To "[email protected]" cc Subject Re: [Ironruby-core] calling ruby scripts from C# If the base class is defined in file “foo.rb” and used in file “

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Tomas Matousek
.Scripting.Hosting.ScriptScope >>> engine.execute_file("bar.rb") [D, C, Object, Kernel] => Microsoft.Scripting.Hosting.ScriptScope Tomas From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, September 30, 200

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread CDurfee
en Email [email protected] Ivan Porto Carrero Sent by: [email protected] 09/30/2009 09:41 AM Please respond to [email protected] To [email protected] cc Subject Re: [Ironruby-core] calling ruby scripts from C# root |_ lib |_

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Ivan Porto Carrero
root |_ lib |_ great_class.rb |_ test |_ test_great_class.rb let's say I add root to my load path then I can reach the files in lib with require 'lib/great_class' or in test_great_class.rb you can do require File.dirname(__FILE__) + "/../lib/great_class" you are free to add the

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Mohammad Azam
Check out the code in this article: http://www.highoncoding.com/Articles/573_First_Look_at_the_IronRuby.aspx On Wed, Sep 30, 2009 at 8:17 AM, Eelco Henderichs wrote: > Dear users, > > I want to build a testscript scheduler / executer in C# that runs > several Ruby scripts in sequence. > > For thi

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Eelco Henderichs
Thanks! The require a file (containing the base) option works. But adding the path to the file containing the base class does not. Here C# reports an error that the file can not be found. Don't what's wrong here, but for know the require a file option will do the trick. -- Posted via http://www

Re: [Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Ivan Porto Carrero
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

[Ironruby-core] calling ruby scripts from C#

2009-09-30 Thread Eelco Henderichs
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.Execu