IronRuby Caveats

Here are a couple caveats to keep in mind if you're following along with the "How do I get started?" screencast from the official IronRuby site.

 

1. Use Debug, not ExternalDebug

Near the 1:50 mark, the presenter switches the build configuration to "ExternalDebug" before (re)building the solution.  This didn't work for me, as all six projects were skipped every time.  I tried a few different build configurations and eventually discovered that the "Debug" configuration worked just fine.

 

2. No local variables in the console

At around the 2:40 mark, the presenter executes a few simple lines of code in the IronRuby console (rbx) just to show that the build is functional.  The only important thing to note in those lines of code is that they're using local variables.  It turns out this capability was a temporary hack that the IronRuby team removed shortly before RubyConf 2007.  If you're playing around in the console, just use instance variables (like @x) or global variables (like $x).

0 comments :