 <p>Read the bottom part of <a href="http://en.wikibooks.org/wiki/Ruby_Programming/Hello_world" rel="nofollow noreferrer">Wikipedia Ruby</a>.</p> <p><strong>Windows</strong></p> <p>If you install the native Windows version of Ruby using the Ruby One-Click Installer, then the installer has setup Windows to automatically recognize your Ruby scripts as executables. Just type the name of the script to run it.</p> <pre><code>$ hello-world.rb Hello world </code></pre> <p><strong>If this does not work, or if you installed Ruby in some other way, follow these steps.</strong></p> <p><em>1. Log in as an administrator. <br> 2. Run the standard Windows "Command Prompt", cmd.<br> 3. At the command prompt (i.e. shell prompt), run the following Windows commands. When you run ftype, change the command-line arguments to correctly point to where you installed the ruby.exe executable on your computer.</em></p> <pre><code>$ assoc .rb=RubyScript .rb=RubyScript $ ftype RubyScript="c:\ruby\bin\ruby.exe" "%1" %* RubyScript="c:\ruby\bin\ruby.exe" "%1" %* </code></pre> <p><strong><em>For more help with these commands, run "help assoc" and "help ftype".</em></strong></p>