IronShay

Ironing code, geek t-shirts and even presentations!

NAVIGATION - SEARCH

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. Note
    You must  have ir.exe defined in your PATH environment variable in order for this to work.  It is a good practice to do that, but if you don’t want to, just write the full path to ir.exe instead of just “ir”.
  6. 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.

Comments (1) -

I would say that your site is one of a kind. Please post more....  I will share something beneficial and extraordinary http://olfacts.com  you must see this!

Reply

Pingbacks and trackbacks (3)+

Add comment