|
|
IronRuby > Documentation > Getting Started
Getting StartedFrom $1Table of contentsNo headersSo 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:
|