Forum: IronRuby more mono problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ivan P. (Guest)
on 2008-12-31 15:02
(Received via mailing list)
It looks like IronRuby doesn't want to function properly on mono.

I can't run an external file for example. I created a file with as
content 1
+ 1 and when I run that file I get the following error:

» mono ir.exe -D test.rb
mscorlib:0:in `set_Fallback': Argument cannot be null.
(System::ArgumentNullException)
    from mscorlib:0:in `.ctor'
    from mscorlib:0:in `GetDecoder'
    from mscorlib:0:in `Initialize'
    from mscorlib:0:in `.ctor'
    from mscorlib:0:in `.ctor'


I can run the console and do 1 + 1 without a problem but then it doesn't
display the result => 2 just a new prompt

» mono ir.exe -D
IronRuby 1.0.0.0 on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.

Note that local variables do not work today in the console.
As a workaround, use globals instead (eg $x = 42 instead of x = 42).

>>> 1 + 1
>>> puts "hello world"
hello world


When I try to require something like rubygems I get the same error as
when I
try to run a file. I'm guessing this is a mono issue.
I changed the paths in ir.exe.config to the correct ones.

» mono ir.exe -D
IronRuby 1.0.0.0 on .NET 2.0.50727.1433
Copyright (c) Microsoft Corporation. All rights reserved.

Note that local variables do not work today in the console.
As a workaround, use globals instead (eg $x = 42 instead of x = 42).

>>> require 'rubygems'
mscorlib:0:in `set_Fallback': Argument cannot be null.
(System::ArgumentNullException)
    from mscorlib:0:in `.ctor'
    from mscorlib:0:in `GetDecoder'
    from mscorlib:0:in `Initialize'
    from mscorlib:0:in `.ctor'
    from mscorlib:0:in `.ctor'
    from IronRuby.Libraries:0:in `require'
This topic is locked and can not be replied to.