# Problem with ironruby on mono

**URL:** <https://www.ruby-forum.com/t/problem-with-ironruby-on-mono/128617>\
**Category:** IronRuby\
**Created:** [February 9, 2008, 12:45pm UTC](https://www.ruby-forum.com/t/problem-with-ironruby-on-mono/128617 "2008-02-09T12:45:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 9, 2008, 12:45pm UTC](https://www.ruby-forum.com/t/problem-with-ironruby-on-mono/128617/1 "2008-02-09T12:45:40Z")

</div>

Hi all,  
I’ve successfully compiled (with rake compile mono=1) IronRuby  
under Linux with Mono but whe I try to execute some code I get  
a strange behaviour, for example:

$ mono rbx.exe  
0.1  
Copyright (c) Microsoft Corporation. All rights reserved.

> > > a = 1  
> > > =\> 1  
> > > puts a  
> > > unknown: undefined local variable or method `a' for main:Object (NoMethodError) b = a + 1 unknown: undefined local variable or method `a’ for main:Object  
> > > (NoMethodError)  
> > > a.class  
> > > unknown: undefined local variable or method `a’ for main:Object  
> > > (NoMethodError)

and so on…  
where’s the problem?

some info:  
$ mono -V  
Mono JIT compiler version 1.9 (/trunk/ r95320)  
Copyright (C) 2002-2007 Novell, Inc and Contributors.  
[www.mono-project.com](http://www.mono-project.com)  
TLS: \_\_thread  
GC: Included Boehm (with typed GC)  
SIGSEGV: altstack  
Notifications: epoll  
Architecture: x86  
Disabled: none

$ mono rbx.exe -V  
IronRuby 0.1 on .NET 2.0.0.0

TIA,  
ras

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 9, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/problem-with-ironruby-on-mono/128617/2 "2008-02-09T12:53:18Z")

</div>

2008/2/9, ras [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > > > a = 1  
> > > > =\> 1  
> > > > puts a  
> > > > unknown: undefined local variable or method `a’ for main:Object (NoMethodError)

This is a known IronRuby problem and unrelated to Mono.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 9, 2008, 1:10pm UTC](https://www.ruby-forum.com/t/problem-with-ironruby-on-mono/128617/3 "2008-02-09T13:10:53Z")

</div>

To be specific, local variables are not supported interactively, use  
global or instance variables. Really need to get that disclaimer  
compiled in…

On Feb 9, 2008 6:47 AM, Sanghyeon S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> * * *
> 
> Ironruby-core mailing list  
> removed\_email\_address@domain.invalid  
> [http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Michael L.  
[Polymath Programmer]  
[http://michaeldotnet.blogspot.com](http://michaeldotnet.blogspot.com)
