# Problem in rbx

**URL:** <https://www.ruby-forum.com/t/problem-in-rbx/125919>\
**Category:** IronRuby\
**Created:** [January 13, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/problem-in-rbx/125919 "2008-01-13T19:51:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![visage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@visage](https://www.ruby-forum.com/u/visage)\
**Post date:** [January 13, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/problem-in-rbx/125919/1 "2008-01-13T19:51:39Z")

</div>

Hi, all,

I’m new to the list, as I’m interested in getting involved in the  
IronRuby  
project (combine my two loves: ruby and C#). I followed John’s video on  
downloading and installing it, and I noticed one major difference: there  
is  
no release folder. Instead, I find rbx.exe in the  
c:\svn\trunk\build\debug.  
When I cd into it and run it, the console comes up. I can do the first  
step  
a = [1,2,3]

but, when I try to do anything with a, it throws a

System.MissingMethodException: undefined local variable or method ‘a’  
for  
main:Ruby.Builtins.RubyClass

Any thoughts?

Also, here is a jinq video capture of the thing:

[http://screencast.com/t/XXlL4EluXK5](http://screencast.com/t/XXlL4EluXK5)

-Corey

---

<div class="post-metadata">

**Author:** ![visage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@visage](https://www.ruby-forum.com/u/visage)\
**Post date:** [January 13, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/problem-in-rbx/125919/2 "2008-01-13T19:54:00Z")

</div>

I believe this is due to a bug (for now) in rbx.exe regarding local  
variables. I think the current advice is to make the variable a global  
like so:

@a = [1, 2, 3]

Hope this helps

Terence

---

<div class="post-metadata">

**Author:** ![visage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@visage](https://www.ruby-forum.com/u/visage)\
**Post date:** [January 13, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/problem-in-rbx/125919/3 "2008-01-13T19:58:07Z")

</div>

Thanks, Terrence, that worked!

-Corey

---

<div class="post-metadata">

**Author:** ![visage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@visage](https://www.ruby-forum.com/u/visage)\
**Post date:** [January 13, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/problem-in-rbx/125919/4 "2008-01-13T20:05:45Z")

</div>

Terence L. wrote:

> I believe this is due to a bug (for now) in rbx.exe regarding local  
> variables. I think the current advice is to make the variable a global  
> like so:
> 
> @a = [1, 2, 3]

@ is for instance variables. $ is for globals. The above code assigns  
[1,2,3] to the instance variable @a on the toplevel object.

- Charlie

---

<div class="post-metadata">

**Author:** ![visage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/90db22/32.png) [@visage](https://www.ruby-forum.com/u/visage)\
**Post date:** [January 13, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/problem-in-rbx/125919/5 "2008-01-13T20:08:05Z")

</div>

Aargh, apologies - you’re right of course :P.

Thanks for the clarification.
