IronRuby > Frequently Asked Questions > How do I actually run a Ruby file with IronRuby?

How do I actually run a Ruby file with IronRuby?

Table of contents
No headers

So you've got the code, compiled it, and want to make sure things are working.

1. Add the directory that ir.exe gets compiled into to your PATH environment variable. By default this path is:

[path_to_ironruby_code]trunk/build/debug

where [path_to_ironruby_code] is the directory you checked the source code out into. You may or may not have a trunk directory below the root depending on how you pulled the source code down from subversion.

2. Create a ruby file named hello.rb in your favorite text editor. Add the following code to it:

puts 'Hello from IronRuby!'

and save it anywhere on your drive.

3. Open a command-prompt window and change into the directory you just saved the ruby file into. Run this command:

ir hello.rb
Tag page
Viewing 1 of 1 comments: view all
I was hoping to find some pointers on using the Visual Studio GUI developer to build some simple apps. I would be happy to post a little test code if I can learn how myself. I have a form with a button that works but I want to change the text property of a label when I click the button. The intellisence is there and I have the label inside the button click event but this is not quite like .NET even though it uses the .NET 3.5.
Posted 02:43, 17 Oct 2008
Viewing 1 of 1 comments: view all
You must login to post a comment.