ironruby

How to use IronRuby or IronPython together with c# in Web/Windows Form?

I am very interesting in the dynamic language runtime of .net, and saw IronRuby/IronPython is built on top of it. I cannot find some example which utilize the dynamic of Ruby/Python from within c#, which is what I realy interested. I saw videos from Microsoft which call JavaScript from within Silverlight using the dynamic of c# 4, just ...

Rails on IronRuby (IIS 6)

I'm trying to get Rails running on a IIS 6 webserver using IronRuby, but without success. I have followed this webcast and got it running on IIS 7, but can't make it work on a IIS 6 server. I need some help to get this to work. Any ideas? ...

Getting all methods inside a script file

After executing this code: var runtime = IronRuby.Ruby.CreateRuntime(); var engine = IronRuby.Ruby.CreateEngine(); var scrope = engine.CreateScope(); engine.ExecuteFile("libtest.rb"); How can I get all the methods of a ruby class in c# code? ...

Installing Cucumber with Ironruby

I'm trying to install Cucumber with ironruby. I followed instructions from http://wiki.github.com/aslakhellesoy/cucumber/ironruby-and-net . It downloads version 0.8.3 of cucumber and version 2.0.2 of gherkin. When i run cucumber i get the following error: c:/ironruby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotnet/lib/gherki ...

Theoretically speaking, I can use IronRuby to write all apps that c# can write, right?

Hi guys, I know some ruby language. Now I need do some .net development. I don't want to learn a new language. So, after googling I got IronRuby. Now my question is Can I use IronRuby to write all apps that c# can write? Thanks. ...

How to manage .net dependencies

I am using require to load an assembly from a specific path. The assembly I load depends on another assembly that is in the same folder. When I try to run the code I get an error saying one of the dependencies could not be found. I have discovered that if I put the second dependency in the bin dir then it works - this is not a suitably...

Creating a .NET object in IronRuby when a static .New() method is defined

It seems impossible to create an object using its default constructor when there is a static .New() method defined on the class: .NET class: public class Tester { public static void New() { Console.WriteLine("In Tester.New()"); } public Tester() { Console.WriteLine("In constructor"); } } IronR...

Free tool for automating GUI testing of a Windows Forms application and a Web application

Is there a way to automate GUI testing of a Windows Forms application and a web application (HTML) using free tools? For example, Ruby + Rspec + Watir work great for web UI testing. IronRuby + Rspec can work for winforms apps. Does anybody know a tool that can do both, WinForms and Web? ...

Executing a mixin method at the end of a class definition

I have a Mix-in that reflects on the receiver class to generate some code. This means that I need to execute the class method at the end of the class definition, like in this trivially dumbed down example: module PrintMethods module ClassMethods def print_methods puts instance_methods end end def self.included(rece...

"require rubygems" takes 20 seconds in IronRuby!

When I embed IronRuby and tell it to require the Ruby gems, it takes a very long time. Does anyone know why? I should mention that when I do this in the IronRuby console (ir.exe), it is nearly instantaneous. var engine = IronRuby.Ruby.CreateEngine(); var paths = engine.GetSearchPaths().ToList(); paths.Add(irPath + @"\lib\IronRuby"); p...

Getting System::Type from IronRuby class

I have an IronRuby script like this one: class MyClassA < NamespaceMaze::BaseClass description = "I'm MyClassA" # <snip> some methods end class HelperClass; end class MyClassC < NamespaceMaze::BaseClass description = "I'm MyClassC" # <snip> some methods end And a .net class like this one: namespace NamespaceMaze { ...

Is it possible to host the .Net DLR in an "idiot-proof" sandbox?

I would like to host the Dynamic Language Runtime (DLR) in such a way that users who run arbitrary scripts in it cannot bring the process down? The DLR hosting spec describes how to host the DLR in a separate ApplicationDomain. This allows to tear down and unload a script runtime and to restrict certain operations through CAS (e.g. I ca...

IronRuby download file using the WebClient "Not enough storage is available to process this command"

Entering the following two lines into an interactive window in IronRuby interactive console. wc = System::Net::WebClient.new doc = wc.DownloadString("http://yahoo.com") I get the following error. => mscorlib:0:in `WinIOError': Not enough storage is available to process this command.\r\n (IOError) from mscorlib:0:in `Write' fr...

Why does attr_accessor create a property, but method is just a method?

I am playing around with the interop between C# and IronRuby. I have noticed that if I define a property in Ruby using attr_accessor, it is presented to C# as a property. If, on the other hand, I create the exact same code manually, it comes back as a method. For example, take this code: var engine = IronRuby.Ruby.CreateEngine(); str...

Unable to run Cucumber using IronRuby

I'm hoping someone knows the answer to this, I'm running Cucumber from IronRuby and getting an IKVM exception. Stack trace is at the bottom. RSpec works fine. Any ideas? can't convert Array into java::util::List (TypeError) C:/Program Files/IronRuby 1.0v4/lib/ironruby/gems/1.8/gems/gherkin-2.1.5-universal-dotnet/lib/gherkin/native...

IronRuby on Rails with IIS 7

I'm trying to get a Rails app built with IronRuby running on IIS 7. I followed all the tutorial given on the IronRuby site but I can't seem to get it to work. The app runs fine hosted under WebBrick but IIS doesn't seem to host it properly. Here is the page I get. Error: exit C:/repositories/RampUp/ruby/RampUp/config/boot.rb:66:in `exi...

How do dictionary lookups work in IronRuby?

I have this line of IronPython code: Traits['Strength'].Score + Traits['Dexterity'].Score Traits is defined as such: Dim m_Traits As New Dictionary(Of String, Trait) scope.SetVariable("Traits", m_Traits) I would like to translate the IronPython code into IronRuby, but I'm having trouble finding the correct syntax. ...

How do I embed iron ruby into a c# program?

I want to embed iron ruby into a mud that I am creating and for some reason I'm having trouble finding the correct examples to get started. All I want to do is create a game where 'you' the player will program bots in iron ruby and then I will interperet the code in c# and make the bots do what you want them to. Also, I want to make it...

Installing IronRuby on Mac

I'm trying to get IronRuby installed on a Mac and having trouble getting it to compile. If I try to build it using MonoDevelop or to compile it directly with xbuild, I get a messaging saying the compiler is crashing while compiling the Microsoft.Dynamic project. When I try to do the rake scripts, I get the message saying I need pkg-con...

Why do some WPF binding fail against IronRuby properties?

So, lets say I have two nearly identical classes in C# and Ruby: C# public class Test { public Test() { ImageLocation = "http://www.ironruby.net/@api/deki/site/logo.png"; } public string ImageLocation { get; set; } } Ruby class Test attr_accessor :ImageLocation def initialize @ImageLocation = ...