ruby cgi setup

STEP 3 – Install Rails – Fortunately, the Windows version of Ruby comes with RubyGems already set up. Open your Command Prompt (start-> run-> cmd -OR- start-> programs-> accessories -> command prompt) and type the following commands.
Do the gem update from the bin directory in rails. For my installation:

cd c:\ruby\bin
gem update
You may be prompted several times to choose which gem. Pick the highest version for (mswin32)

gem install rails --include-dependencies
There may be some delays, and the install could take a while. If you encounter an error trying to use the gem command, just restart the Command Prompt.
STEP 4 – Create a Rails App – While your still in Command Prompt, type the following Command (without the brackets, and change “your-app-name” to whatever you wish to call your application)
rails C:/xampp/htdocs/<your-app-name>
STEP 5 – Configure Apache – With your Xampp installation, http://localhost (localhost:80) defaults to the Xampp browser control panel, which displays your status, tests, etc.. We want to be able to use Ruby, without disrupting this service, or interfering with our standard Xampp settings. Open your Xampp directory (in our case C:\Xampp) and browse to Apache\conf\httpd.conf and open the httpd.conf file in a text editor or other text editor of your choice.
Scroll all the way to the bottom, and add the following:
Listen 3000
LoadModule rewrite_module modules/mod_rewrite.so
#################################
# RUBY SETUP
#################################
<virtualHost *:3000>
ServerName rails

DocumentRoot "c:/xampp/htdocs/<your-app-name>/public"
<Directory "c:/xampp/htdocs/<your-app-name>/public/">

Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny
AddHandler cgi-script .cgi
AddHandler fastcgi-script .fcgi
</Directory>
</VirtualHost>

#################################
# RUBY SETUP
#################################
Finally – Check it Out – Point your browser to http://localhost:3000 and you should see the “Welcome Aboard” from ROR.