IronRuby is an open-source implementation of the Ruby programming language which is tightly integrated with the .NET Framework.
Questions tagged [ironruby]
268 questions
0
votes
1 answer
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()");
…

Philippe Leybaert
- 168,566
- 31
- 210
- 223
0
votes
1 answer
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…

Derek Ekins
- 11,215
- 6
- 61
- 71
0
votes
1 answer
Trying to creat an IronRuby project in Visual Studio 2013
I have some code that I've cloned from GitHub. I am trying to create an IronRuby project in Visual studio 2013, and then import this code into Visual Studio. Once configuration is complete I should be able to modify using markdown.
I downloaded…

theBroadsway
- 1
- 2
0
votes
3 answers
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…

arneeiri
- 224
- 1
- 5
0
votes
2 answers
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…

ryudice
- 36,476
- 32
- 115
- 163
0
votes
1 answer
Resolving "require"s when executing IronRuby from C#
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…

James Sulak
- 31,389
- 11
- 53
- 57
0
votes
1 answer
Load assemblies at ironruby console startup
I'm trying to load some default assemblies and init some variables with ironruby, and I don't know where to start.
What I'm trying to create is something similar to rails script/console: you run that script and get a console where all rails Classes…

Ricardo Amores
- 4,597
- 1
- 31
- 45
0
votes
3 answers
Why doesn't IronRuby have the same tools that IronPython does?
I've been using Ruby as my main scripting language for years but switched to .NET several years ago. I'd like to continue using Ruby (primarily for testing) BUT the toolset for IronRuby is really nonexistent. Why?
In Python, meanwhile, there are…

rsteckly
- 1,952
- 3
- 23
- 35
0
votes
1 answer
Inspect variables in IronRuby scope
I want browse (and inspect) scope variables of ironruby scope.
If i execute:
a = 15
b = 16
c = a * b
I want to enumerate "a, b, c" and get their value on demand.
I tried runtime.Globals.GetVariableNames() and runtime.Globals.GetItems() but both…

TcKs
- 25,849
- 11
- 66
- 104
0
votes
1 answer
How do you raise a .Net event from an IronRuby class?
I'm trying to figure out how to implement an event in a ruby class. Specifically, I am trying to make my class implement an interface (INotifyPropertyChanged) that includes an event (PropertyChanged). I can create my add_PropertyChanged and…

Brian Genisio
- 47,787
- 16
- 124
- 167
0
votes
1 answer
Retrieving accessors in IronRuby
I'm trying to figure out how to retrieve the value stored in the Person class. The problem is just that after I define an instance of the Person class, I don't know how to retrieve it within the IronRuby code because the instance name is in the…

rsteckly
- 1,952
- 3
- 23
- 35
0
votes
1 answer
Is there an IronRuby lib for generating concrete CLR classes?
I want to expose a class to CLR classes. The reason I have is Xaml. I want to write WPF custom controls in Ruby, then use xaml to style and provide templates for them. Last time I tried, Xaml couldn't look up IronRuby types.
class NavBar <…

Ball
- 2,591
- 3
- 19
- 26
0
votes
1 answer
Access Expression methods in IronRuby
This code works fine in C#:
Expression.Lambda(LambdaBody);
But none of the methods for building AST seem to visible from IronRuby. I required Microsoft.Scripting.Core and Microsoft.Scripting libraries. Do I need something else?
Here is the IronRuby…

potlee
- 405
- 1
- 5
- 13
0
votes
1 answer
WPF binded controlls only update when value changed to null
i binded a control to property of the dynamic type, My MainWindow Class inherits from INotifyPropertyChanged, Also defined method OnPropertyChanged:
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(String…

user3926274
- 1
- 2
0
votes
1 answer
How to set handler for WebRequest.GetResponseAsync in IronRuby?
I'm trying:
request = WebRequest.Create( uri )
responseTask = request.GetResponseAsync
action = Action.new { process_request( sender, e ) }
task = Task.new( action )
responseTask.Wait( TimeSpan.new( -1 ) )
responseTask.ContinueWith( task )
But…

ostapische
- 1,572
- 2
- 12
- 26