DCSIMG
Configuring SciTE to Run IronRuby - IronShay

Configuring SciTE to Run IronRuby

I talked with Ariel today and recommended him my favorite Ruby editor for small scripts and apps – SciTE.

The nice thing about SciTE is the ability to run your script file from the application via the F5 key. Since we were talking about IronRuby, SciTE gave us good syntax highlighting and auto-completion features, but we couldn’t execute our code on the IronRuby interpreter.

BUT… this is a problem of the past now! with a few simple steps, you can turn your SciTE environment to an IronRuby stupendous development environment! or at least make it use the IronRuby interpreter…

Now, to the job:

  1. Open SciTE.
  2. Go to Options->Open ruby.properties:
    Running IronRuby via SciTE Step 1
  3. A file with a lot of settings will be opened inside the editor window. Look for the text “ruby $(FileNameExt)” (I have it on line  108 and  116).
  4. Change “ruby $(FileNameExt)” to “ir $(FileNameExt)” on both places (if you’re on Windows, changing the first one will be enough):
    Running IronRuby via SciTE Step 2
    Pay attention that there is the rbw line (look at line 110 on the image). I haven’t changed it because it’s not that common to use rbw files and also IronRuby doesn’t have the option as far as I know… I just left it there to use the regular MRI interpreter.
    If you want to make sure that every Ruby file on SciTE environment is run via IronRuby, change “rubyw $(FileNameExt)” to “ir $(FileNameExt)” as well.
  5. Save the file.

That’s it, your’re done! now go and create an rb file and hit F5. IronRuby will run your script now.

Running IronRuby via SciTE Step 3

Enjoy!
Shay.

Published Thursday, October 01, 2009 1:49 PM by shayf
תגים:, ,

Comments

No Comments

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: