IronRuby > Documentation > Getting Started

Getting Started

From $1

Table of contents
No headers

So you've got the code, compiled it, and want to make sure things are properly 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]/Merlin/Main/bin/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!'

 then 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

4. If you want to use the Ruby standard library, you need to tell IronRuby where to find it. To do this, you have to set the LibraryPaths option in ir.exe.config:

<set language="Ruby" option="LibraryPaths" value="..\..\Languages\Ruby\libs;c:\ruby\lib\ruby\site_ruby\1.8;c:\ruby\lib\ruby\site_ruby;c:\ruby\lib\ruby\1.8"></set>
(Basically substitute all the "..\..\..\External\Languages\Ruby\Ruby-1.8.6" with your path to Ruby ... usually c:\ruby)
Tags:
 
Images (1)
Viewing 1 - 1 of 1 images | View All
IronRuby HelloWorld in 3 lines
IronRuby HelloWorld in 3 lines
Administr...  Actions
Comments (4)
Viewing 4 of 4 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
I think this post is lacking in terms of introducing dot net developers to IronRuby. I was hoping for a better experience in downloading/installing/tutorials of getting the IronRuby source to work. Can anyone provide a better post? Thanks.
Posted 14:52, 2 Feb 2009
Viewing 4 of 4 comments: view all
You must login to post a comment.

 
SourceForge.net